@@ -3662,8 +3662,7 @@ describe('Parse.User testing', () => {
3662
3662
} , done . fail ) ;
3663
3663
} ) ;
3664
3664
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 ( ) => {
3667
3666
let emailCalledCount = 0 ;
3668
3667
const emailAdapter = {
3669
3668
sendVerificationEmail : ( ) => {
@@ -3673,25 +3672,22 @@ describe('Parse.User testing', () => {
3673
3672
sendPasswordResetEmail : ( ) => Promise . resolve ( ) ,
3674
3673
sendMail : ( ) => Promise . resolve ( ) ,
3675
3674
} ;
3676
- reconfigureServer ( {
3675
+ await reconfigureServer ( {
3677
3676
appName : 'unused' ,
3678
3677
verifyUserEmails : true ,
3679
3678
emailAdapter : emailAdapter ,
3680
3679
publicServerURL : 'http://localhost:8378/1' ,
3681
3680
} ) ;
3682
3681
const user = new Parse . User ( ) ;
3683
3682
user . set ( 'email' , '[email protected] ' ) ;
3684
- Parse . FacebookUtils . link ( user , {
3683
+ const linkedUser = await Parse . FacebookUtils . link ( user , {
3685
3684
id : '8675309' ,
3686
3685
access_token : 'jenny' ,
3687
3686
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
- } ) ;
3694
3687
} ) ;
3688
+ linkedUser . set ( 'email' , '[email protected] ' ) ;
3689
+ await linkedUser . save ( ) ;
3690
+ expect ( emailCalledCount ) . toBe ( 0 ) ;
3695
3691
} ) ;
3696
3692
3697
3693
it ( 'should be able to update user with authData passed' , done => {
0 commit comments