From 2f314890fb5d272a49eb505fe88341427c0f02e5 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 6 Nov 2026 18:08:31 +0100 Subject: [PATCH] Point the right provider test at a later occurrence (#137) --- .../agendula/data/tasks/provider/ProviderWriterTest.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/androidTest/java/de/jeanlucmakiola/agendula/data/tasks/provider/ProviderWriterTest.kt b/app/src/androidTest/java/de/jeanlucmakiola/agendula/data/tasks/provider/ProviderWriterTest.kt index f60f8a3..2bb83e5 100644 --- a/app/src/androidTest/java/de/jeanlucmakiola/agendula/data/tasks/provider/ProviderWriterTest.kt +++ b/app/src/androidTest/java/de/jeanlucmakiola/agendula/data/tasks/provider/ProviderWriterTest.kt @@ -685,11 +685,9 @@ class ProviderWriterTest { store().setCompletedInstance(series, today, false) val override = db.tasks().overrides(series).single() db.tasks().update(override.copy(title = "Standup (moved room)")) - // The second occurrence: completing the first moves the series on instead. - val second = today + 1.days - val row = readRow(ProviderTable.INSTANCES, instanceId(second)) + val row = readRow(ProviderTable.INSTANCES, instanceId(today)) - writer.update(ProviderTable.INSTANCES, row + (Tasks.STATUS to 2), byId(ProviderTable.INSTANCES, instanceId(second)), null) + writer.update(ProviderTable.INSTANCES, row + (Tasks.STATUS to 2), byId(ProviderTable.INSTANCES, instanceId(today)), null) assertThat(task(series)!!.title).isEqualTo("Standup") assertThat(task(override.id)!!.title).isEqualTo("Standup (moved room)") @@ -736,7 +734,7 @@ class ProviderWriterTest { val series = db.tasks().insert( TaskEntity(listId = home, uid = "f", title = "Floating", due = today, rrule = "FREQ=DAILY;COUNT=3", timezone = null), ) - // The second occurrence: completing the first moves the series on instead. + // The second occurrence: ticking the first moves the series on instead. val second = today + 1.days val row = readRow(ProviderTable.INSTANCES, instanceId(second))