patch to remove timeout from login test
This commit is contained in:
parent
6033a99223
commit
add9e49bb6
2 changed files with 2 additions and 4 deletions
|
@ -36,7 +36,7 @@ const login = async (req, res, next) => {
|
|||
|
||||
const queryResults = await knex('user')
|
||||
.where({username: user.username})
|
||||
.select('username', 'email', 'password')
|
||||
.select()
|
||||
.then(queryResults => queryResults);
|
||||
|
||||
const savedUser = queryResults[0] || null;
|
||||
|
@ -44,7 +44,6 @@ const login = async (req, res, next) => {
|
|||
|
||||
const hashedPassword = savedUser.password;
|
||||
const passwordMatch = await compareHash(user.password, hashedPassword);
|
||||
|
||||
if (!passwordMatch) return res.status(401).json({err: 'bad credentials'});
|
||||
|
||||
const authorizedUser = {...savedUser};
|
||||
|
|
|
@ -87,8 +87,7 @@ const authSpec = (chai, knex, server) => {
|
|||
})
|
||||
})
|
||||
|
||||
it('post to login with registered user should return cookie', function(done) {
|
||||
this.timeout(5000);
|
||||
it('post to login with registered user should return cookie', done => {
|
||||
chai.request(server)
|
||||
.post('/auth/signup')
|
||||
.type('form')
|
||||
|
|
Loading…
Reference in a new issue