Skip to content

Commit 32e3034

Browse files
committed
clean
1 parent 09251b5 commit 32e3034

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

auth/src/test/java/com/firebase/ui/auth/viewmodel/CredentialManagerHandlerTest.java

+1-12
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,11 @@ public void testSaveCredentials_success() {
7777
ActivityController<TestActivity> controller = Robolectric.buildActivity(TestActivity.class).setup();
7878
TestActivity testActivity = controller.get();
7979

80-
// In a real test, you might inject a mock or fake CredentialManager
81-
// that returns success. For simplicity, we rely on valid user/password
82-
// so the Handler will produce a SUCCESS Resource if no exceptions occur.
83-
84-
// Mock a valid FirebaseUser
85-
// E.g., if your code checks user.email != null, ensure it's non-null
86-
// (We won't rely on mMockAuth in this example, but you could if needed.)
8780
com.google.firebase.auth.FirebaseUser mockUser = TestHelper.getMockFirebaseUser();
88-
// Make sure .getEmail() is non-null
8981
org.mockito.Mockito.when(mockUser.getEmail()).thenReturn(TestConstants.EMAIL);
9082

91-
// Save with a non-null user and password => should produce LOADING -> SUCCESS
9283
mHandler.saveCredentials(
93-
testActivity, // A mocked Activity or real, as needed
84+
testActivity,
9485
mockUser,
9586
"test-password"
9687
);
@@ -104,8 +95,6 @@ public void testSaveCredentials_failure() {
10495
ActivityController<TestActivity> controller = Robolectric.buildActivity(TestActivity.class).setup();
10596
TestActivity testActivity = controller.get();
10697

107-
// If we pass a null user or missing password,
108-
// the Handler should produce LOADING -> FAILURE
10998
mHandler.saveCredentials(
11099
testActivity,
111100
null, // invalid user

0 commit comments

Comments
 (0)