fix: recognize stable APK releases as newer than release candidates (#1184)
This commit is contained in:
5 files changed
+196
-18
No files matched your search
@@ -166,6 +166,21 @@ class AppUpdateViewModelTest {
|
||||
|
||||
// ── Manual check ────────────────────────────────────────────────────
|
||||
|
||||
@Test
|
||||
fun checkForUpdate_stableReleasePromptsInstalledRc() =
|
||||
runTest {
|
||||
coEvery { checker.fetchLatestRelease() } returns updateInfo(tag = "v1.25")
|
||||
val vm = AppUpdateViewModel(app, checker, "1.25.rc.1", testDispatcher)
|
||||
advanceUntilIdle()
|
||||
|
||||
vm.checkForUpdate()
|
||||
advanceUntilIdle()
|
||||
|
||||
assertTrue(vm.state.value is AppUpdateState.UpdateAvailable)
|
||||
assertEquals("v1.25", (vm.state.value as AppUpdateState.UpdateAvailable).latestTag)
|
||||
assertEquals(vm.state.value, AppUpdateCache.state.value)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun checkForUpdate_upToDateWhenSameVersion() =
|
||||
runTest {
|
||||
|
||||
Reference in new issue
Block a user