This commit is contained in:
Jackson Harper 2023-05-10 23:09:04 +08:00
parent f8fc1306df
commit b9ef239e84

View file

@ -152,6 +152,23 @@ describe('auth router', () => {
)
})
})
context('when password is over max length', () => {
before(() => {
email = 'Some_email'
password = 'badpass'.repeat(100)
username = 'omnivore_admin'
})
it('redirects to sign up page with error code INVALID_PASSWORD', async () => {
const res = await signupRequest(email, password, name, username).expect(
302
)
expect(res.header.location).to.endWith(
'/email-signup?errorCodes=INVALID_PASSWORD'
)
})
})
})
describe('login', () => {