Drive-In event ideas: an idea withdrawn for a rule change shows again when re-proposed
The box's third run proposed the Ant-Man double again under rules 4, but its history entry from rules 3 was marked withdrawn, so it was recorded as known and left off the Chair. A re-proposed idea now replaces its withdrawn entry. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -79,4 +79,17 @@ class EventIdeasTest {
|
||||
val sat = ideaEvening(IdeaFormat.SaturdayTriple, LocalDate.of(2026, 11, 14), 0L, emptySet(), 6 * 3_600_000L, london)!!
|
||||
assertEquals(LocalDate.of(2026, 11, 21), sat.toLocalDate()) // Universal Monsters has the 14th
|
||||
}
|
||||
|
||||
@Test fun anIdeaWithdrawnOnlyForARuleChangeComesBackWhenProposedAgain() {
|
||||
val file = java.io.File.createTempFile("history", ".json").apply { deleteOnExit(); writeText("[]") }
|
||||
val idea = EventIdea("franchise:X|FridayDouble", "X Night", "franchise", IdeaFormat.FridayDouble, java.time.LocalDateTime.of(2026, 12, 4, 20, 0),
|
||||
listOf(film("1", "X", setOf("Action")), film("2", "X II", setOf("Action"))), listOf("why"), 7.0)
|
||||
EventIdeaHistory.record(file, listOf(idea), 1)
|
||||
file.writeText(file.readText().replace("\"rules\":$EVENT_IDEA_RULES", "\"rules\":1"))
|
||||
EventIdeaHistory.withdrawOld(file)
|
||||
assertEquals("withdrawn: rules changed", EventIdeaHistory.load(file).single().optString("decision"))
|
||||
EventIdeaHistory.record(file, listOf(idea), 2)
|
||||
assertEquals("proposed", EventIdeaHistory.load(file).single().optString("decision"))
|
||||
assertEquals(2L, EventIdeaHistory.load(file).single().optLong("shownMs"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user