Offer only Windows builds as a replaced itch upload and stop a cancelled update from completing

This commit is contained in:
FX192 committed 2026-10-28 08:47:50 +03:00
1 parent 0e173ed05a
commit 9b44bf798d
3 files changed
+8 -1

No files matched your search

@@ -41,6 +41,12 @@ class ItchUpdatesTest {
assertTrue(update.replaced)
}
@Test fun aReplacedUploadWithNoWindowsBuildLeftIsNotOffered() {
val linux = list(upload("8", "2026-10-01T10:00:00Z", windows = false))
assertNull(ItchUpdates.evaluate(linux, "7", "2026-09-01T10:00:00Z"))
assertNull(ItchUpdates.evaluate(linux, "", "2026-09-01T10:00:00Z"))
}
@Test fun anUnknownInstalledVersionNeverReportsAnUpdate() {
assertNull(ItchUpdates.evaluate(list(upload("7", "2026-10-20T10:00:00Z")), "7", ""))
}