@@ -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' , 'email1@host.com' ) ;
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' , 'email2@host.com' ) ;
3690- user . save ( ) . then ( ( ) => {
3691- expect ( emailCalledCount ) . toBe ( 0 ) ;
3692- done ( ) ;
3693- } ) ;
36943687 } ) ;
3688+ linkedUser . set ( 'email' , 'email2@host.com' ) ;
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