From 0cd3ca57fdea1b10d490f2e435ff23334cd1c5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diana=20L=C3=B3pez=20Alvas?= Date: Wed, 3 Apr 2024 16:16:06 -0300 Subject: [PATCH] testing with email as identifier --- test/api/auth.spec.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/api/auth.spec.ts b/test/api/auth.spec.ts index c50479b..cb66a22 100644 --- a/test/api/auth.spec.ts +++ b/test/api/auth.spec.ts @@ -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: 'lita.sadosky@program.ar' }) 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: 'lita.sadosky@program.ar' }) + await request().post(`/password-recovery?userIdentifier=lita.sadosky@program.ar`) + .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)