test set auth token after login

This commit is contained in:
Hongbo Wu
2022-07-21 21:01:00 +08:00
committed by Jackson Harper
parent abb1a414c1
commit bd2327a3ae

View File

@ -173,6 +173,12 @@ describe('auth router', () => {
const res = await loginRequest(email, password).expect(302)
expect(res.header.location).to.endWith('/waitlist')
})
it('set auth token in cookie', async () => {
const res = await loginRequest(email, password).expect(302)
expect(res.header['set-cookie']).to.be.an('array')
expect(res.header['set-cookie'][0]).to.contain('auth')
})
})
context('when user not exists', () => {