Skip to content

Commit 3a935cb

Browse files
committed
Update integration_test.cc
1 parent 1ab9ba4 commit 3a935cb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

auth/integration_test/src/integration_test.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ TEST_F(FirebaseAuthTest, TestUpdateUserProfile) {
649649
auth_->CreateUserWithEmailAndPassword(email.c_str(), kTestPassword);
650650
WaitForCompletion(create_user, "CreateUserWithEmailAndPassword");
651651
EXPECT_TRUE(auth_->current_user().is_valid());
652+
652653
// Set some user profile properties.
653654
firebase::auth::User user = create_user.result()->user;
654655
const char kDisplayName[] = "Hello World";
@@ -661,6 +662,8 @@ TEST_F(FirebaseAuthTest, TestUpdateUserProfile) {
661662
user = auth_->current_user();
662663
EXPECT_EQ(user.display_name(), kDisplayName);
663664
EXPECT_EQ(user.photo_url(), kPhotoUrl);
665+
666+
// Validate that the new properties are present after signing out and in.
664667
SignOut();
665668
WaitForCompletion(
666669
auth_->SignInWithEmailAndPassword(email.c_str(), kTestPassword),
@@ -677,6 +680,7 @@ TEST_F(FirebaseAuthTest, TestUpdateUserProfileNull) {
677680
auth_->CreateUserWithEmailAndPassword(email.c_str(), kTestPassword);
678681
WaitForCompletion(create_user, "CreateUserWithEmailAndPassword");
679682
EXPECT_TRUE(auth_->current_user().is_valid());
683+
680684
// Set some user profile properties.
681685
firebase::auth::User user = create_user.result()->user;
682686
const char kDisplayName[] = "Hello World";
@@ -689,6 +693,7 @@ TEST_F(FirebaseAuthTest, TestUpdateUserProfileNull) {
689693
user = auth_->current_user();
690694
EXPECT_EQ(user.display_name(), kDisplayName);
691695
EXPECT_EQ(user.photo_url(), kPhotoUrl);
696+
692697
// Setting the entries to null should leave the old values
693698
firebase::auth::User::UserProfile user_profile_null;
694699
user_profile_null.display_name = nullptr;
@@ -699,6 +704,8 @@ TEST_F(FirebaseAuthTest, TestUpdateUserProfileNull) {
699704
user = auth_->current_user();
700705
EXPECT_EQ(user.display_name(), kDisplayName);
701706
EXPECT_EQ(user.photo_url(), kPhotoUrl);
707+
708+
// Validate that the new properties are present after signing out and in.
702709
SignOut();
703710
WaitForCompletion(
704711
auth_->SignInWithEmailAndPassword(email.c_str(), kTestPassword),
@@ -715,6 +722,7 @@ TEST_F(FirebaseAuthTest, TestUpdateUserProfileEmpty) {
715722
auth_->CreateUserWithEmailAndPassword(email.c_str(), kTestPassword);
716723
WaitForCompletion(create_user, "CreateUserWithEmailAndPassword");
717724
EXPECT_TRUE(auth_->current_user().is_valid());
725+
718726
// Set some user profile properties.
719727
firebase::auth::User user = create_user.result()->user;
720728
const char kDisplayName[] = "Hello World";
@@ -727,6 +735,7 @@ TEST_F(FirebaseAuthTest, TestUpdateUserProfileEmpty) {
727735
user = auth_->current_user();
728736
EXPECT_EQ(user.display_name(), kDisplayName);
729737
EXPECT_EQ(user.photo_url(), kPhotoUrl);
738+
730739
// Setting the fields to empty should clear it.
731740
firebase::auth::User::UserProfile user_profile_empty;
732741
user_profile_empty.display_name = "";
@@ -737,6 +746,8 @@ TEST_F(FirebaseAuthTest, TestUpdateUserProfileEmpty) {
737746
user = auth_->current_user();
738747
EXPECT_EQ(user.display_name(), "");
739748
EXPECT_EQ(user.photo_url(), "");
749+
750+
// Validate that the properties are cleared out after signing out and in.
740751
SignOut();
741752
WaitForCompletion(
742753
auth_->SignInWithEmailAndPassword(email.c_str(), kTestPassword),

0 commit comments

Comments
 (0)