@@ -275,56 +275,6 @@ describe('admin.auth', () => {
275275 } ) ;
276276 } ) ;
277277
278- it ( 'getUserByProviderUid() returns a user record with the matching provider id' , async ( ) => {
279- // TODO(rsgowman): Once we can link a provider id with a user, just do that
280- // here instead of creating a new user.
281- const randomUid = 'import_' + generateRandomString ( 20 ) . toLowerCase ( ) ;
282- const importUser : admin . auth . UserImportRecord = {
283- uid : randomUid ,
284- 285- phoneNumber : '+15555550000' ,
286- emailVerified : true ,
287- disabled : false ,
288- metadata : {
289- lastSignInTime : 'Thu, 01 Jan 1970 00:00:00 UTC' ,
290- creationTime : 'Thu, 01 Jan 1970 00:00:00 UTC' ,
291- } ,
292- providerData : [ {
293- displayName : 'User Name' ,
294- 295- phoneNumber : '+15555550000' ,
296- photoURL : 'http://example.com/user' ,
297- providerId : 'google.com' ,
298- uid : 'google_uid' ,
299- } ] ,
300- } ;
301-
302- await admin . auth ( ) . importUsers ( [ importUser ] ) ;
303-
304- try {
305- await admin . auth ( ) . getUserByProviderUid ( 'google.com' , 'google_uid' )
306- . then ( ( userRecord ) => {
307- expect ( userRecord . uid ) . to . equal ( importUser . uid ) ;
308- } ) ;
309- } finally {
310- await safeDelete ( importUser . uid ) ;
311- }
312- } ) ;
313-
314- it ( 'getUserByProviderUid() redirects to getUserByEmail if given an email' , ( ) => {
315- return admin . auth ( ) . getUserByProviderUid ( 'email' , mockUserData . email )
316- . then ( ( userRecord ) => {
317- expect ( userRecord . uid ) . to . equal ( newUserUid ) ;
318- } ) ;
319- } ) ;
320-
321- it ( 'getUserByProviderUid() redirects to getUserByPhoneNumber if given a phone number' , ( ) => {
322- return admin . auth ( ) . getUserByProviderUid ( 'phone' , mockUserData . phoneNumber )
323- . then ( ( userRecord ) => {
324- expect ( userRecord . uid ) . to . equal ( newUserUid ) ;
325- } ) ;
326- } ) ;
327-
328278 describe ( 'getUsers()' , ( ) => {
329279 /**
330280 * Filters a list of object to another list of objects that only contains
@@ -1813,7 +1763,7 @@ describe('admin.auth', () => {
18131763 code : true ,
18141764 } ,
18151765 } ;
1816- return getAuth ( ) . updateProviderConfig ( authProviderConfig1 . providerId , modifiedConfigOptions )
1766+ return getAuth ( ) . updateProviderConfig ( authProviderConfig1 . providerId , deltaChanges )
18171767 . then ( ( config ) => {
18181768 assertDeepEqualUnordered ( modifiedConfigOptions , config ) ;
18191769 } ) ;
@@ -1831,7 +1781,7 @@ describe('admin.auth', () => {
18311781 code : false ,
18321782 } ,
18331783 } ;
1834- return admin . auth ( ) . updateProviderConfig ( authProviderConfig1 . providerId , deltaChanges ) .
1784+ return getAuth ( ) . updateProviderConfig ( authProviderConfig1 . providerId , deltaChanges ) .
18351785 should . eventually . be . rejected . and . have . property ( 'code' , 'auth/invalid-oauth-responsetype' ) ;
18361786 } ) ;
18371787
0 commit comments