-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3de4ca
commit 0cd3ca5
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,13 +123,20 @@ describeApi('Users', (request, { authenticated, token }) => { | |
|
||
describe('POST /password-recovery', () => { | ||
|
||
test('Send email', async () => { | ||
test('Send email - user identifier', async () => { | ||
await request().post('/register').send({ ...userJson, username: 'TEST', email: '[email protected]' }) | ||
await request().post(`/password-recovery?userIdentifier=TEST`) | ||
.expect(200) | ||
.then(emailSent('Cambiar tu contraseña de Pilas Bloques')) | ||
}) | ||
|
||
test('Send email - email identifier', async () => { | ||
await request().post('/register').send({ ...userJson, username: 'TEST', email: '[email protected]' }) | ||
await request().post(`/[email protected]`) | ||
.expect(200) | ||
.then(emailSent('Cambiar tu contraseña de Pilas Bloques')) | ||
}) | ||
|
||
test('Does not send email', async () => { | ||
await request().post(`/password-recovery?userIdentifier=${username}`) | ||
.expect(200) | ||
|