Node.js based forum software built for the modern web
fix: test for https://github.com/NodeBB/NodeBB/pull/9180
Barış Soner Uşaklı8ece64ab829f
diff --git a/test/controllers.js b/test/controllers.jsindex 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) {