A test that holds the Drive-In fix: the slot match moved into shownPlan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -146,3 +146,20 @@ class RecheckAfterRescanTest {
|
||||
} finally { dir.deleteRecursively() }
|
||||
}
|
||||
}
|
||||
|
||||
/** 15 November 2026: the Drive-In's film, found again under a new number, stayed on tuning because the screen matched on the old one. */
|
||||
class RefiledPlaysTest {
|
||||
private fun item(id: String) = SampleItem("Fixture Film", "Movie", 90, "", id, 90 * 60_000L)
|
||||
private fun plan(id: String) = EmbyPlaybackPlan(item(id), "https://media.example.test/$id.mkv", "src$id", "fixture-play", emptyList(), 90 * 60_000L)
|
||||
private val booked = SampleBroadcast(ScheduledMedia(item("old1"), "srcold1", 90 * 60_000L), 1_000L)
|
||||
|
||||
@Test fun aCopyFoundAgainPlaysInItsBookedSlot() {
|
||||
assertNotNull(shownPlan(plan("old1"), "old1", 1_000L, booked, null))
|
||||
// The re-filed copy, for the booked programme, in its slot: shown.
|
||||
assertNotNull(shownPlan(plan("new1"), "old1", 1_000L, booked, null))
|
||||
// Prepared for another programme, another slot, or with a problem: not shown.
|
||||
assertNull(shownPlan(plan("new1"), "other", 1_000L, booked, null))
|
||||
assertNull(shownPlan(plan("new1"), "old1", 2_000L, booked, null))
|
||||
assertNull(shownPlan(plan("new1"), "old1", 1_000L, booked, "This programme isn't available right now."))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user