diff --git a/packages/api/test/routers/auth.test.ts b/packages/api/test/routers/auth.test.ts index 4e4044a17..38b889f24 100644 --- a/packages/api/test/routers/auth.test.ts +++ b/packages/api/test/routers/auth.test.ts @@ -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', () => {