Only hold back a late start-of-now reminder, keep the old rung check (#178)
This commit is contained in:
1 parent
42c1df84bd
commit
0fabb6cd58
3 files changed
+21
-10
No files matched your search
@@ -441,6 +441,11 @@ class ReminderPlannerTest {
|
||||
assertThat(ReminderPlanner.plan(listOf(task), mapOf(13L to atStart), Settings(), now, berlin)).isEmpty()
|
||||
assertThat(ReminderPlanner.triggers(task, atStart, Settings(), berlin, sinceCreated = false))
|
||||
.containsExactly(ScheduledReminder(13, start.toEpochMilliseconds()))
|
||||
assertThat(ReminderPlanner.afterSave(task, null, atStart, Settings(), berlin))
|
||||
.contains(ScheduledReminder(13, start.toEpochMilliseconds()))
|
||||
val fastClock = task.copy(created = Instant.fromEpochMilliseconds(start.toEpochMilliseconds() + 600_000))
|
||||
assertThat(ReminderPlanner.plan(listOf(fastClock), mapOf(13L to atStart), Settings(), start.toEpochMilliseconds() - 60_000, berlin))
|
||||
.containsExactly(ScheduledReminder(13, start.toEpochMilliseconds()))
|
||||
val nextDay = task.copy(start = Instant.fromEpochMilliseconds(start.toEpochMilliseconds() + 86_400_000))
|
||||
assertThat(ReminderPlanner.plan(listOf(nextDay), mapOf(13L to atStart), Settings(), now, berlin))
|
||||
.containsExactly(ScheduledReminder(13, nextDay.start!!.toEpochMilliseconds()))
|
||||
|
||||
Reference in new issue
Block a user