test of rpvhost

This commit is contained in:
jysperm
2014-11-02 14:56:31 +08:00
parent d65b640b0c
commit 810066c1cf
4 changed files with 15 additions and 3 deletions

View File

@@ -151,7 +151,7 @@ exports.initializePlugins = ->
i18n.loadForPlugin plugin
if fs.existsSync path.join(plugin_path, 'static')
app.use harp.mount("/plugin/#{plugin_name}", path.join(plugin_path, 'static'))
app.express.use harp.mount("/plugin/#{plugin_name}", path.join(plugin_path, 'static'))
exports.createHelpers = (plugin) ->
plugin.registerHook = (hook_name, payload) ->

View File

@@ -26,6 +26,6 @@ exports.registerHook 'view.pay.display_payment_details',
callback exports.t(req) 'view.payment_details',
order_id: deposit_log.payload.order_id
app.get '/', (req, res) ->
app.express.get '/', (req, res) ->
exports.render 'index', req, {}, (html) ->
res.send html

View File

@@ -0,0 +1,12 @@
describe 'plugin/rpvhost', ->
agent = null
before ->
agent = supertest.agent app.express
describe 'router', ->
it 'GET /', (done) ->
agent.get '/'
.redirects 0
.expect 200
.end done

View File

@@ -14,7 +14,7 @@ module.exports =
default_timezone: 'Asia/Shanghai'
plugin:
available_extensions: ['bitcoin', 'wiki']
available_extensions: ['bitcoin', 'wiki', 'rpvhost']
available_services: []
billing: