@@ -402,19 +402,23 @@ public void testGetUserByProviderUidWithPhone() throws Exception {
402
402
TestResponseInterceptor interceptor = initializeAppForUserManagement (
403
403
TestUtils .loadResource ("getUser.json" ));
404
404
UserRecord userRecord = FirebaseAuth .getInstance ()
405
- .getUserByProviderUidAsync ("phone" , "+1234567890" ).get ();
405
+ .getUserByProviderUidAsync (new String ( "phone" ) , "+1234567890" ).get ();
406
406
checkUserRecord (userRecord );
407
407
checkRequestHeaders (interceptor );
408
+ GenericJson parsed = parseRequestContent (interceptor );
409
+ assertEquals (ImmutableList .of ("+1234567890" ), parsed .get ("phoneNumber" ));
408
410
}
409
411
410
412
@ Test
411
413
public void testGetUserByProviderUidWithEmail () throws Exception {
412
414
TestResponseInterceptor interceptor = initializeAppForUserManagement (
413
415
TestUtils .loadResource ("getUser.json" ));
414
416
UserRecord userRecord = FirebaseAuth .getInstance ()
415
- .
getUserByProviderUidAsync (
"email" ,
"[email protected] " ).
get ();
417
+ .
getUserByProviderUidAsync (
new String ( "email" ) ,
"[email protected] " ).
get ();
416
418
checkUserRecord (userRecord );
417
419
checkRequestHeaders (interceptor );
420
+ GenericJson parsed = parseRequestContent (interceptor );
421
+ assertEquals (
ImmutableList .
of (
"[email protected] " ),
parsed .
get (
"email" ));
418
422
}
419
423
420
424
@ Test
@@ -1248,20 +1252,22 @@ public void testDeleteProviderAndPhone() {
1248
1252
1249
1253
@ Test
1250
1254
public void testDoubleDeletePhoneProvider () throws Exception {
1255
+ String providerId = new String ("phone" );
1251
1256
UserRecord .UpdateRequest update = new UserRecord .UpdateRequest ("uid" )
1252
1257
.setPhoneNumber (null );
1253
1258
1254
1259
try {
1255
- update .setProvidersToUnlink (ImmutableList .of ("phone" ));
1260
+ update .setProvidersToUnlink (ImmutableList .of (providerId ));
1256
1261
fail ("No error thrown for double delete phone provider" );
1257
1262
} catch (IllegalArgumentException expected ) {
1258
1263
}
1259
1264
}
1260
1265
1261
1266
@ Test
1262
1267
public void testDoubleDeletePhoneProviderReverseOrder () throws Exception {
1268
+ String providerId = new String ("phone" );
1263
1269
UserRecord .UpdateRequest update = new UserRecord .UpdateRequest ("uid" )
1264
- .setProvidersToUnlink (ImmutableList .of ("phone" ));
1270
+ .setProvidersToUnlink (ImmutableList .of (providerId ));
1265
1271
1266
1272
try {
1267
1273
update .setPhoneNumber (null );
0 commit comments