Skip to content

Commit 1522061

Browse files
author
Manny Jimenez
committed
Fixing tests
1 parent 3129d6d commit 1522061

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

firebase-appdistribution/src/test/java/com/google/firebase/appdistribution/FirebaseAppDistributionTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,12 @@ public void checkForNewRelease_whenCheckForNewReleaseFails_throwsError() {
188188
}
189189

190190
@Test
191-
public void checkForNewRelease_callsSignInTester() {
192-
when(mockNewReleaseFetcher.checkForNewRelease())
193-
.thenReturn(Tasks.forResult(TEST_RELEASE_NEWER_AAB_INTERNAL.build()));
191+
public void checkForNewRelease_testerIsNotSignedIn_taskFails() {
192+
when(firebaseAppDistribution.isTesterSignedIn()).thenReturn(false);
194193

195-
firebaseAppDistribution.checkForNewRelease();
194+
Task<AppDistributionRelease> task = firebaseAppDistribution.checkForNewRelease();
196195

197-
verify(mockTesterSignInManager, times(1)).signInTester();
196+
assertTaskFailure(task, AUTHENTICATION_FAILURE, AUTHENTICATION_ERROR);
198197
}
199198

200199
@Test

0 commit comments

Comments
 (0)