Fix u2f tests
parent
631b201229
commit
3d82cef30b
|
@ -162,7 +162,8 @@ function sign(req, res) {
|
|||
req.session.auth_session.second_factor = true;
|
||||
res.status(204);
|
||||
res.send();
|
||||
}, function(err) {
|
||||
})
|
||||
.catch(function(err) {
|
||||
logger.error('U2F sign: %s', err);
|
||||
res.status(401);
|
||||
res.send();
|
||||
|
|
|
@ -220,7 +220,7 @@ describe('test u2f routes', function() {
|
|||
|
||||
req.session.auth_session.sign_request = {};
|
||||
req.app.get.withArgs('u2f').returns(u2f_mock);
|
||||
u2f.register(req, res);
|
||||
u2f.sign(req, res);
|
||||
});
|
||||
|
||||
it('should return unauthorized error when no sign request has been initiated', function(done) {
|
||||
|
@ -234,7 +234,7 @@ describe('test u2f routes', function() {
|
|||
u2f_mock.finishAuthentication.returns(Promise.resolve());
|
||||
|
||||
req.app.get.withArgs('u2f').returns(u2f_mock);
|
||||
u2f.register(req, res);
|
||||
u2f.sign(req, res);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue