fix: Incomplete user object in verifyEmail function if both username and email are changed (#8889)
This commit is contained in:
@@ -51,6 +51,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => {
|
||||
user.setUsername('zxcv');
|
||||
user.setEmail('testIfEnabled@parse.com');
|
||||
await user.signUp();
|
||||
await jasmine.timeout();
|
||||
expect(emailAdapter.sendVerificationEmail).toHaveBeenCalled();
|
||||
user.fetch().then(() => {
|
||||
expect(user.get('emailVerified')).toEqual(false);
|
||||
@@ -184,6 +185,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => {
|
||||
user.setUsername('zxcv');
|
||||
user.set('email', 'testSendSimpleAdapter@parse.com');
|
||||
await user.signUp();
|
||||
await jasmine.timeout();
|
||||
expect(calls).toBe(1);
|
||||
user
|
||||
.fetch()
|
||||
@@ -324,6 +326,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => {
|
||||
user.setUsername('user');
|
||||
user.set('email', 'user@example.com');
|
||||
await user.signUp();
|
||||
await jasmine.timeout();
|
||||
expect(sendEmailOptions).not.toBeUndefined();
|
||||
const response = await request({
|
||||
url: sendEmailOptions.link,
|
||||
@@ -635,6 +638,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => {
|
||||
user.setUsername('zxcv');
|
||||
user.set('email', 'user@parse.com');
|
||||
await user.signUp();
|
||||
await jasmine.timeout();
|
||||
expect(emailSent).toBe(true);
|
||||
done();
|
||||
});
|
||||
@@ -662,6 +666,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => {
|
||||
user.set('email', 'user@parse.com');
|
||||
return user.signUp();
|
||||
})
|
||||
.then(() => jasmine.timeout())
|
||||
.then(() => {
|
||||
expect(sendEmailOptions).not.toBeUndefined();
|
||||
request({
|
||||
|
||||
Reference in New Issue
Block a user