A test that holds the Drive-In fix: the slot match moved into shownPlan
release-gate / verify (push) Successful in 11m51s
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 3m12s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 3m3s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 21:36:55 +00:00
co-authored by Claude Opus 5.5
parent b9697bfd81
commit 5b5b613b6b
3 changed files with 27 additions and 2 deletions
@@ -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."))
}
}