From 8ece64ab829f157898b3b52816a4ffc6df6fd26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 7 Jan 2021 21:42:19 -0500 Subject: [PATCH] fix: test for https://github.com/NodeBB/NodeBB/pull/9180 --- test/controllers.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/controllers.js b/test/controllers.js index 670ab3be34..382e1ccd62 100644 --- a/test/controllers.js +++ b/test/controllers.js @@ -95,17 +95,17 @@ describe('Controllers', function () { assert(hookData.res); assert(hookData.next); - hookData.res.render('custom', { + hookData.res.render('mycustompage', { works: true, }); } var message = utils.generateUUID(); - var name = 'custom.tpl'; + var name = 'mycustompage.tpl'; var tplPath = path.join(nconf.get('views_dir'), name); before(async () => { plugins.registerHook('myTestPlugin', { - hook: 'action:homepage.get:custom', + hook: 'action:homepage.get:mycustompage', method: hookMethod, }); @@ -224,14 +224,14 @@ describe('Controllers', function () { }); it('api should work with hook', function (done) { - meta.configs.set('homePageRoute', 'custom', function (err) { + meta.configs.set('homePageRoute', 'mycustompage', function (err) { assert.ifError(err); request(nconf.get('url') + '/api', { json: true }, function (err, res, body) { assert.ifError(err); assert.equal(res.statusCode, 200); assert.equal(body.works, true); - assert.equal(body.template.custom, true); + assert.equal(body.template.mycustompage, true); done(); }); @@ -239,7 +239,7 @@ describe('Controllers', function () { }); it('should render with hook', function (done) { - meta.configs.set('homePageRoute', 'custom', function (err) { + meta.configs.set('homePageRoute', 'mycustompage', function (err) { assert.ifError(err); request(nconf.get('url'), function (err, res, body) {