Pin the clock in the delete-following subtree test (#65)
Reviewed-on: https://codeberg.org/jlmakiola/agendula/pulls/65
This commit is contained in:
+3
-2
@@ -570,13 +570,14 @@ class RoomTasksDataSourceTest {
|
||||
|
||||
@Test
|
||||
fun deletingFollowingFromTheFirstOccurrenceTakesTheWholeSubtree() {
|
||||
val start = now
|
||||
val series = db.tasks().insert(
|
||||
TaskEntity(listId = listId, uid = "s", title = "s", dtstart = now, rrule = "FREQ=DAILY;COUNT=3"),
|
||||
TaskEntity(listId = listId, uid = "s", title = "s", dtstart = start, rrule = "FREQ=DAILY;COUNT=3"),
|
||||
)
|
||||
val child = source.insertTask(form("child").copy(parentId = series))
|
||||
val grandchild = source.insertTask(form("grandchild").copy(parentId = child))
|
||||
|
||||
source.deleteFollowing(series, now)
|
||||
source.deleteFollowing(series, start)
|
||||
|
||||
assertThat(listOf(series, child, grandchild).mapNotNull { db.tasks().entity(it) }).isEmpty()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user