Skip to content

Commit 96a4b12

Browse files
authored
Fixing integration tests : TestCreateUserMFA() (#524)
* Fixing MFA integration tests
1 parent b502f25 commit 96a4b12

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

integration/auth/user_mgt_test.go

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ func TestCreateUserMFA(t *testing.T) {
444444
if err != nil {
445445
t.Fatalf("CreateUser() = %v; want = nil", err)
446446
}
447-
uidToDelete := user.UID
448-
defer deleteUser(uidToDelete)
447+
defer deleteUser(user.UID)
449448
var factor []*auth.MultiFactorInfo = []*auth.MultiFactorInfo{
450449
{
451450
UID: user.MultiFactor.EnrolledFactors[0].UID,
@@ -473,24 +472,6 @@ func TestCreateUserMFA(t *testing.T) {
473472
if !reflect.DeepEqual(*user, want) {
474473
t.Errorf("CreateUser() = %#v; want = %#v", *user, want)
475474
}
476-
factor = []*auth.MultiFactorInfo{}
477-
user, err = client.CreateUser(context.Background(), (&auth.UserToCreate{}).UID(user.UID))
478-
want = auth.UserRecord{
479-
UserInfo: &auth.UserInfo{
480-
UID: user.UID,
481-
ProviderID: "firebase",
482-
},
483-
UserMetadata: &auth.UserMetadata{
484-
CreationTimestamp: user.UserMetadata.CreationTimestamp,
485-
},
486-
TokensValidAfterMillis: user.TokensValidAfterMillis,
487-
MultiFactor: &auth.MultiFactorSettings{
488-
EnrolledFactors: factor,
489-
},
490-
}
491-
if err == nil || user != nil || !auth.IsUIDAlreadyExists(err) {
492-
t.Errorf("CreateUser(existing-uid) = (%#v, %v); want = (%#v, error)", user, err, want)
493-
}
494475
}
495476

496477
func TestUpdateUser(t *testing.T) {

0 commit comments

Comments
 (0)