diff --git a/test/loc.strategy.js b/test/loc.strategy.js index b9220476..522873c7 100644 --- a/test/loc.strategy.js +++ b/test/loc.strategy.js @@ -16,8 +16,8 @@ app.use(function cookieTest(req, res, next) { assert(res.locals.__n); assert(res.locals.t); assert(res.locals.tn); - assert(res.locals.getLocale()); - assert(res.locals.isPreferredLocale()); + assert(res.locals.getLocale); + assert(res.locals.isPreferredLocale); }) // route diff --git a/test/loc.urlTranslate.js b/test/loc.urlTranslate.js index 4b0e8f30..b611e435 100644 --- a/test/loc.urlTranslate.js +++ b/test/loc.urlTranslate.js @@ -7,6 +7,7 @@ var loc = require('./fixtures/setup')(app); // test that the cookie is set and that req.i18n and res.locals are present. app.use(function cookieTest(req, res, next) { + next(); var cookies = res.get('Set-Cookie'); assert(~cookies.indexOf('lang=')); assert(req.i18n); @@ -14,9 +15,8 @@ app.use(function cookieTest(req, res, next) { assert(res.locals.__n); assert(res.locals.t); assert(res.locals.tn); - assert(res.locals.getLocale()); - assert(res.locals.isPreferredLocale()); - next(); + assert(res.locals.getLocale); + assert(res.locals.isPreferredLocale); }) // route