Correct test to check req status after function is finished.

This commit is contained in:
Blade Barringer
2015-11-13 09:21:22 -06:00
parent eab9d7b3ba
commit 939bc893c6
2 changed files with 4 additions and 4 deletions

View File

@@ -82,8 +82,9 @@ describe('getUserLanguage', () => {
userId: 123 userId: 123
}; };
getUserLanguage(req, res, next); getUserLanguage(req, res, () => {
expect(req.language).to.equal('it'); expect(req.language).to.equal('it');
}); });
}); });
}); });
});

View File

@@ -75,7 +75,6 @@ export default function getUserLanguage (req, res, next) {
.exec() .exec()
.then((user) => { .then((user) => {
req.language = _getFromUser(user, req); req.language = _getFromUser(user, req);
console.log(req.language);
return next(); return next();
}) })
.catch(next); .catch(next);