Skip to content

Commit

Permalink
Fixing integration tests : TestCreateUserMFA() (#524)
Browse files Browse the repository at this point in the history
* Fixing MFA integration tests
  • Loading branch information
pragatimodi authored Nov 10, 2022
1 parent b502f25 commit 96a4b12
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions integration/auth/user_mgt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@ func TestCreateUserMFA(t *testing.T) {
if err != nil {
t.Fatalf("CreateUser() = %v; want = nil", err)
}
uidToDelete := user.UID
defer deleteUser(uidToDelete)
defer deleteUser(user.UID)
var factor []*auth.MultiFactorInfo = []*auth.MultiFactorInfo{
{
UID: user.MultiFactor.EnrolledFactors[0].UID,
Expand Down Expand Up @@ -473,24 +472,6 @@ func TestCreateUserMFA(t *testing.T) {
if !reflect.DeepEqual(*user, want) {
t.Errorf("CreateUser() = %#v; want = %#v", *user, want)
}
factor = []*auth.MultiFactorInfo{}
user, err = client.CreateUser(context.Background(), (&auth.UserToCreate{}).UID(user.UID))
want = auth.UserRecord{
UserInfo: &auth.UserInfo{
UID: user.UID,
ProviderID: "firebase",
},
UserMetadata: &auth.UserMetadata{
CreationTimestamp: user.UserMetadata.CreationTimestamp,
},
TokensValidAfterMillis: user.TokensValidAfterMillis,
MultiFactor: &auth.MultiFactorSettings{
EnrolledFactors: factor,
},
}
if err == nil || user != nil || !auth.IsUIDAlreadyExists(err) {
t.Errorf("CreateUser(existing-uid) = (%#v, %v); want = (%#v, error)", user, err, want)
}
}

func TestUpdateUser(t *testing.T) {
Expand Down

0 comments on commit 96a4b12

Please sign in to comment.