Skip to content

Commit 6879188

Browse files
committed
un-xit test
1 parent 7842266 commit 6879188

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

spec/ParseUser.spec.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3662,8 +3662,7 @@ describe('Parse.User testing', () => {
36623662
}, done.fail);
36633663
});
36643664

3665-
xit('should not send a verification email if the user signed up using oauth', done => {
3666-
// 'this test fails. See: https://github.com/parse-community/parse-server/issues/5097'
3665+
it('should not send a verification email if the user signed up using oauth', async () => {
36673666
let emailCalledCount = 0;
36683667
const emailAdapter = {
36693668
sendVerificationEmail: () => {
@@ -3673,25 +3672,22 @@ describe('Parse.User testing', () => {
36733672
sendPasswordResetEmail: () => Promise.resolve(),
36743673
sendMail: () => Promise.resolve(),
36753674
};
3676-
reconfigureServer({
3675+
await reconfigureServer({
36773676
appName: 'unused',
36783677
verifyUserEmails: true,
36793678
emailAdapter: emailAdapter,
36803679
publicServerURL: 'http://localhost:8378/1',
36813680
});
36823681
const user = new Parse.User();
36833682
user.set('email', '[email protected]');
3684-
Parse.FacebookUtils.link(user, {
3683+
const linkedUser = await Parse.FacebookUtils.link(user, {
36853684
id: '8675309',
36863685
access_token: 'jenny',
36873686
expiration_date: new Date().toJSON(),
3688-
}).then(user => {
3689-
user.set('email', '[email protected]');
3690-
user.save().then(() => {
3691-
expect(emailCalledCount).toBe(0);
3692-
done();
3693-
});
36943687
});
3688+
linkedUser.set('email', '[email protected]');
3689+
await linkedUser.save();
3690+
expect(emailCalledCount).toBe(0);
36953691
});
36963692

36973693
it('should be able to update user with authData passed', done => {

0 commit comments

Comments
 (0)