Skip to content

Commit 7714357

Browse files
committed
improved tests to ensure requesting password reset email does not unlock account
1 parent fbc8748 commit 7714357

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/AccountLockoutPolicy.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ describe('lockout with password reset option', () => {
407407
await expectAsync(Parse.User.logIn(username, password)).toBeRejected();
408408

409409
await Parse.User.requestPasswordReset(user.getEmail());
410+
await expectAsync(Parse.User.logIn(username, password)).toBeRejected();
411+
410412
const link = sendPasswordResetEmail.calls.all()[0].args[0].link;
411413
const linkUrl = new URL(link);
412414
const token = linkUrl.searchParams.get('token');
@@ -440,6 +442,8 @@ describe('lockout with password reset option', () => {
440442
await expectAsync(Parse.User.logIn(username, password)).toBeRejected();
441443

442444
await Parse.User.requestPasswordReset(user.getEmail());
445+
await expectAsync(Parse.User.logIn(username, password)).toBeRejected();
446+
443447
const link = sendPasswordResetEmail.calls.all()[0].args[0].link;
444448
const linkUrl = new URL(link);
445449
const token = linkUrl.searchParams.get('token');

0 commit comments

Comments
 (0)