@@ -149,7 +149,7 @@ public void checkForUpdateTask_whenCalledMultipleTimes_returnsTheSameTask() {
149
149
@ Test
150
150
public void checkForUpdate_succeeds () throws Exception {
151
151
when (mockFirebaseAppDistributionTesterApiClient .fetchLatestRelease (any (), any (), any (), any ()))
152
- .thenReturn (TEST_RELEASE_CURRENT );
152
+ .thenReturn (TEST_RELEASE_NEWER_APK );
153
153
when (mockFirebaseInstallations .getId ()).thenReturn (Tasks .forResult (TEST_FID_1 ));
154
154
when (mockFirebaseInstallations .getToken (false ))
155
155
.thenReturn (Tasks .forResult (mockInstallationTokenResult ));
@@ -160,7 +160,7 @@ public void checkForUpdate_succeeds() throws Exception {
160
160
task .addOnCompleteListener (testExecutor , onCompleteListener );
161
161
162
162
AppDistributionReleaseInternal appDistributionReleaseInternal = onCompleteListener .await ();
163
- assertEquals (TEST_RELEASE_CURRENT , appDistributionReleaseInternal );
163
+ assertEquals (TEST_RELEASE_NEWER_APK , appDistributionReleaseInternal );
164
164
verify (mockFirebaseInstallations , times (1 )).getId ();
165
165
verify (mockFirebaseInstallations , times (1 )).getToken (false );
166
166
}
@@ -227,18 +227,11 @@ public void getLatestReleaseFromClient_whenLatestReleaseIsNewerBuildThanInstalle
227
227
}
228
228
229
229
@ Test
230
- public void getLatestReleaseFromClient_whenLatestReleaseIsOlderBuildThanInstalled_returnsNull ()
230
+ public void getLatestReleaseFromClient_whenLatestReleaseIsSameRelease_returnsNull ()
231
231
throws Exception {
232
- AppDistributionReleaseInternal olderTestRelease =
233
- AppDistributionReleaseInternal .builder ()
234
- .setBinaryType (BinaryType .APK )
235
- .setBuildVersion ("1" )
236
- .setDisplayVersion ("1.0" )
237
- .setReleaseNotes ("Older version." )
238
- .build ();
239
232
when (mockFirebaseAppDistributionTesterApiClient .fetchLatestRelease (
240
233
TEST_FID_1 , TEST_APP_ID_1 , TEST_API_KEY , TEST_AUTH_TOKEN ))
241
- .thenReturn (olderTestRelease );
234
+ .thenReturn (TEST_RELEASE_CURRENT );
242
235
243
236
AppDistributionReleaseInternal release =
244
237
checkForUpdateClient .getLatestReleaseFromClient (
0 commit comments