|
|
|
@ -35,6 +35,19 @@ describe('Auth registration password and email constraints', () => { |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('Attempting to register an already registered user', () => { |
|
|
|
|
it('should fail', async done => { |
|
|
|
|
let req = await init(); |
|
|
|
|
try { |
|
|
|
|
await helpers.createUser(req, "someone@email.com", "password1A!", 200); |
|
|
|
|
await helpers.createUser(req, "someone@email.com", "password1A!", 400); |
|
|
|
|
} finally { |
|
|
|
|
req.close(); |
|
|
|
|
done(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('Auth login access for users', () => { |
|
|
|
|
it('is correctly enforced', async done => { |
|
|
|
|
let req = await init(); |
|
|
|
|