Skip to content

Commit eac061f

Browse files
committed
fix: Update existing test expectation for resend verification email
Update test to expect success page redirect instead of fail page when emailVerifySuccessOnInvalidEmail is true (default), matching the new anti-enumeration behavior.
1 parent 8444c5a commit eac061f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/ValidationAndPasswordsReset.spec.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => {
740740
});
741741
});
742742

743-
it('redirects you to link send fail page if you try to resend a link for a nonexistant user', done => {
743+
it('redirects you to link send success page if you try to resend a link for a nonexistent user', done => {
744744
reconfigureServer({
745745
appName: 'emailing app',
746746
verifyUserEmails: true,
@@ -760,7 +760,9 @@ describe('Custom Pages, Email Verification, Password Reset', () => {
760760
},
761761
}).then(response => {
762762
expect(response.status).toEqual(303);
763-
expect(response.text).toContain('email_verification_send_fail.html');
763+
// With emailVerifySuccessOnInvalidEmail: true (default), the resend
764+
// page redirects to success to prevent user enumeration
765+
expect(response.text).toContain('email_verification_send_success.html');
764766
done();
765767
});
766768
});

0 commit comments

Comments
 (0)