mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
Fix u2f tests
This commit is contained in:
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
Block a user