mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-01-12 22:27:09 +08:00
test of rpvhost
This commit is contained in:
@@ -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) ->
|
||||
|
||||
@@ -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
|
||||
|
||||
12
plugin/rpvhost/test/rpvhost.test.coffee
Normal file
12
plugin/rpvhost/test/rpvhost.test.coffee
Normal 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
|
||||
@@ -14,7 +14,7 @@ module.exports =
|
||||
default_timezone: 'Asia/Shanghai'
|
||||
|
||||
plugin:
|
||||
available_extensions: ['bitcoin', 'wiki']
|
||||
available_extensions: ['bitcoin', 'wiki', 'rpvhost']
|
||||
available_services: []
|
||||
|
||||
billing:
|
||||
|
||||
Reference in New Issue
Block a user