Keep a deleted override for undo as its VTODO, not an embedded task row (#79)
This commit is contained in:
1 parent
69edcb2b71
commit
8dcc48b0ba
7 files changed
+112
-210
No files matched your search
@@ -2,7 +2,7 @@
|
||||
"formatVersion": 1,
|
||||
"database": {
|
||||
"version": 7,
|
||||
"identityHash": "774919dbed9faffbddd3358514b60bdd",
|
||||
"identityHash": "8c3b7fe8ad462e6667c4cfd355ac4f22",
|
||||
"entities": [
|
||||
{
|
||||
"tableName": "accounts",
|
||||
@@ -773,7 +773,7 @@
|
||||
},
|
||||
{
|
||||
"tableName": "advanced_deleted",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `copy_id` INTEGER NOT NULL, `anchor` INTEGER NOT NULL, `alarms` TEXT NOT NULL DEFAULT '', `row_id` INTEGER NOT NULL, `row_list_id` INTEGER NOT NULL, `row_uid` TEXT NOT NULL, `row_href` TEXT, `row_etag` TEXT, `row_title` TEXT, `row_description` TEXT, `row_location` TEXT, `row_url` TEXT, `row_color` INTEGER, `row_categories` TEXT NOT NULL DEFAULT '', `row_status` INTEGER NOT NULL DEFAULT 0, `row_percent_complete` INTEGER, `row_completed_at` INTEGER, `row_priority` INTEGER NOT NULL DEFAULT 0, `row_classification` INTEGER, `row_dtstart` INTEGER, `row_due` INTEGER, `row_duration` TEXT, `row_is_all_day` INTEGER NOT NULL DEFAULT 0, `row_untimed` TEXT, `row_timezone` TEXT, `row_rrule` TEXT, `row_rdate` TEXT, `row_exdate` TEXT, `row_recurrence_id` INTEGER, `row_master_id` INTEGER, `row_parent_id` INTEGER, `row_sort_order` INTEGER NOT NULL DEFAULT 0, `row_created_at` INTEGER, `row_last_modified` INTEGER, `row_sequence` INTEGER NOT NULL DEFAULT 0, `row_is_dirty` INTEGER NOT NULL DEFAULT 0, `row_is_deleted` INTEGER NOT NULL DEFAULT 0, `row_unknown_properties` TEXT, `row_reminders_off` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY(`copy_id`) REFERENCES `advanced_occurrences`(`copy_id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `copy_id` INTEGER NOT NULL, `anchor` INTEGER NOT NULL, `vtodo` TEXT NOT NULL, `color` INTEGER, `sort_order` INTEGER NOT NULL DEFAULT 0, `reminders_off` INTEGER NOT NULL DEFAULT 0, `alarms` TEXT NOT NULL DEFAULT '', FOREIGN KEY(`copy_id`) REFERENCES `advanced_occurrences`(`copy_id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
@@ -793,213 +793,37 @@
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "vtodo",
|
||||
"columnName": "vtodo",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "color",
|
||||
"columnName": "color",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "sortOrder",
|
||||
"columnName": "sort_order",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
},
|
||||
{
|
||||
"fieldPath": "remindersOff",
|
||||
"columnName": "reminders_off",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
},
|
||||
{
|
||||
"fieldPath": "alarms",
|
||||
"columnName": "alarms",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true,
|
||||
"defaultValue": "''"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.id",
|
||||
"columnName": "row_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.listId",
|
||||
"columnName": "row_list_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.uid",
|
||||
"columnName": "row_uid",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.href",
|
||||
"columnName": "row_href",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.etag",
|
||||
"columnName": "row_etag",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.title",
|
||||
"columnName": "row_title",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.description",
|
||||
"columnName": "row_description",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.location",
|
||||
"columnName": "row_location",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.url",
|
||||
"columnName": "row_url",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.color",
|
||||
"columnName": "row_color",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.categories",
|
||||
"columnName": "row_categories",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true,
|
||||
"defaultValue": "''"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.status",
|
||||
"columnName": "row_status",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.percentComplete",
|
||||
"columnName": "row_percent_complete",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.completedAt",
|
||||
"columnName": "row_completed_at",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.priority",
|
||||
"columnName": "row_priority",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.classification",
|
||||
"columnName": "row_classification",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.dtstart",
|
||||
"columnName": "row_dtstart",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.due",
|
||||
"columnName": "row_due",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.duration",
|
||||
"columnName": "row_duration",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.isAllDay",
|
||||
"columnName": "row_is_all_day",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.untimed",
|
||||
"columnName": "row_untimed",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.timezone",
|
||||
"columnName": "row_timezone",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.rrule",
|
||||
"columnName": "row_rrule",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.rdate",
|
||||
"columnName": "row_rdate",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.exdate",
|
||||
"columnName": "row_exdate",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.recurrenceId",
|
||||
"columnName": "row_recurrence_id",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.masterId",
|
||||
"columnName": "row_master_id",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.parentId",
|
||||
"columnName": "row_parent_id",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.sortOrder",
|
||||
"columnName": "row_sort_order",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.createdAt",
|
||||
"columnName": "row_created_at",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.lastModified",
|
||||
"columnName": "row_last_modified",
|
||||
"affinity": "INTEGER"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.sequence",
|
||||
"columnName": "row_sequence",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.isDirty",
|
||||
"columnName": "row_is_dirty",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.isDeleted",
|
||||
"columnName": "row_is_deleted",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.unknownProperties",
|
||||
"columnName": "row_unknown_properties",
|
||||
"affinity": "TEXT"
|
||||
},
|
||||
{
|
||||
"fieldPath": "row.remindersOff",
|
||||
"columnName": "row_reminders_off",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true,
|
||||
"defaultValue": "0"
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
@@ -1036,7 +860,7 @@
|
||||
],
|
||||
"setupQueries": [
|
||||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '774919dbed9faffbddd3358514b60bdd')"
|
||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '8c3b7fe8ad462e6667c4cfd355ac4f22')"
|
||||
]
|
||||
}
|
||||
}
|
||||
+3
@@ -386,6 +386,9 @@ class RoomTasksDataSourceTest {
|
||||
val back = db.tasks().override(id, edited)!!
|
||||
assertThat(back.title).isEqualTo("Just this once")
|
||||
assertThat(back.uid).isEqualTo(db.tasks().entity(id)!!.uid)
|
||||
assertThat(back.recurrenceId).isEqualTo(edited)
|
||||
assertThat(back.dtstart!!.epochSeconds).isEqualTo(edited.epochSeconds)
|
||||
assertThat(back.due!!.epochSeconds).isEqualTo((edited + 1.hours).epochSeconds)
|
||||
assertThat(db.alarms().forTask(back.id).map { it.minutesBefore }).containsExactly(15)
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -211,6 +211,10 @@ class TasksDatabaseMigrationTest {
|
||||
assertThat(c.moveToFirst()).isTrue()
|
||||
assertThat(c.getInt(0)).isEqualTo(0)
|
||||
}
|
||||
val columns = db.query("SELECT name FROM pragma_table_info('advanced_deleted')").use { c ->
|
||||
buildList { while (c.moveToNext()) add(c.getString(0)) }
|
||||
}
|
||||
assertThat(columns).containsExactly("id", "copy_id", "anchor", "vtodo", "color", "sort_order", "reminders_off", "alarms")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package de.jeanlucmakiola.agendula.data.tasks.room
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Embedded
|
||||
import androidx.room.Entity
|
||||
import androidx.room.ForeignKey
|
||||
import androidx.room.Index
|
||||
@@ -10,7 +9,10 @@ import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.PrimaryKey
|
||||
import androidx.room.Query
|
||||
import de.jeanlucmakiola.agendula.data.tasks.ical.VTodoMapper
|
||||
import de.jeanlucmakiola.agendula.domain.TaskStatus
|
||||
import de.jeanlucmakiola.agendula.domain.ical.ICalParser
|
||||
import de.jeanlucmakiola.agendula.domain.ical.ICalSerializer
|
||||
import java.net.URLDecoder
|
||||
import java.net.URLEncoder
|
||||
import kotlin.time.Instant
|
||||
@@ -88,7 +90,9 @@ data class AdvancedDetachedEntity(
|
||||
|
||||
/**
|
||||
* An open override a tick repeating from completion deleted (#79), as it stood:
|
||||
* the row and its alarms, so undoing the tick brings it back.
|
||||
* the row and its alarms, so undoing the tick brings it back. The row is kept
|
||||
* as the `VTODO` a sync would upload, beside the few columns that never reach
|
||||
* one, so a new task column needs no column here.
|
||||
*/
|
||||
@Entity(
|
||||
tableName = "advanced_deleted",
|
||||
@@ -106,11 +110,29 @@ data class AdvancedDeletedEntity(
|
||||
@PrimaryKey(autoGenerate = true) @ColumnInfo(name = "id") val id: Long = 0,
|
||||
@ColumnInfo(name = "copy_id") val copyId: Long,
|
||||
@ColumnInfo(name = "anchor") val anchor: Instant,
|
||||
@Embedded(prefix = "row_") val row: TaskEntity,
|
||||
/** The row as [VTodoMapper.write] serialises it, without its alarms. */
|
||||
@ColumnInfo(name = "vtodo") val vtodo: String,
|
||||
@ColumnInfo(name = "color") val color: Int?,
|
||||
@ColumnInfo(name = "sort_order", defaultValue = "0") val sortOrder: Int = 0,
|
||||
@ColumnInfo(name = "reminders_off", defaultValue = "0") val remindersOff: Boolean = false,
|
||||
/** The override's alarms, as [encodeAlarms] writes them. */
|
||||
@ColumnInfo(name = "alarms", defaultValue = "") val alarms: String = "",
|
||||
) {
|
||||
/** The row [of] stored, its identity and sync state left to the caller; null when it cannot be read. */
|
||||
fun read(): VTodoMapper.Mapped? = runCatching { VTodoMapper.read(ICalParser.parse(vtodo)) }.getOrNull()
|
||||
?.let { it.copy(entity = it.entity.copy(color = color, sortOrder = sortOrder, remindersOff = remindersOff)) }
|
||||
|
||||
companion object {
|
||||
fun of(copyId: Long, anchor: Instant, row: TaskEntity, alarms: List<TaskAlarmEntity>) = AdvancedDeletedEntity(
|
||||
copyId = copyId,
|
||||
anchor = anchor,
|
||||
vtodo = ICalSerializer.serialize(VTodoMapper.write(row)),
|
||||
color = row.color,
|
||||
sortOrder = row.sortOrder,
|
||||
remindersOff = row.remindersOff,
|
||||
alarms = encodeAlarms(alarms),
|
||||
)
|
||||
|
||||
private const val NULL = "-"
|
||||
private const val VALUE = "+"
|
||||
|
||||
|
||||
@@ -693,7 +693,7 @@ class RoomTasksDataSource @Inject constructor(
|
||||
}
|
||||
val detached = toDetach.map { (at, row) -> at to detach(row, now) }
|
||||
val deleted = toDelete.map { row ->
|
||||
AdvancedDeletedEntity(copyId = 0, anchor = row.recurrenceId!!, row = row, alarms = AdvancedDeletedEntity.encodeAlarms(alarms.forTask(row.id)))
|
||||
AdvancedDeletedEntity.of(copyId = 0, anchor = row.recurrenceId!!, row = row, alarms = alarms.forTask(row.id))
|
||||
.also { tasks.delete(row.id) }
|
||||
}
|
||||
val (start, due) = occurrenceTimes(master, newAnchor)
|
||||
@@ -911,8 +911,9 @@ class RoomTasksDataSource @Inject constructor(
|
||||
/** An override [advance] deleted, back on [master] unless its occurrence has a row again. */
|
||||
private fun restoreDeleted(deleted: AdvancedDeletedEntity, master: TaskEntity, now: Instant) {
|
||||
if (tasks.byUid(master.listId, master.uid, deleted.anchor) != null) return
|
||||
val read = deleted.read() ?: return
|
||||
val id = tasks.insert(
|
||||
deleted.row.copy(
|
||||
read.entity.copy(
|
||||
id = 0,
|
||||
listId = master.listId,
|
||||
uid = master.uid,
|
||||
@@ -927,6 +928,7 @@ class RoomTasksDataSource @Inject constructor(
|
||||
),
|
||||
)
|
||||
AdvancedDeletedEntity.decodeAlarms(deleted.alarms, id).forEach { alarms.insert(it) }
|
||||
read.alarms.forEach { alarms.insert(it.copy(taskId = id)) }
|
||||
}
|
||||
|
||||
/** [row], a detached occurrence, back as [master]'s override for [anchor]. */
|
||||
|
||||
@@ -221,7 +221,7 @@ abstract class TasksDatabase : RoomDatabase() {
|
||||
override fun migrate(db: SupportSQLiteDatabase) {
|
||||
db.execSQL("ALTER TABLE tasks ADD COLUMN `untimed` TEXT")
|
||||
db.execSQL(
|
||||
"CREATE TABLE IF NOT EXISTS `advanced_deleted` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `copy_id` INTEGER NOT NULL, `anchor` INTEGER NOT NULL, `alarms` TEXT NOT NULL DEFAULT '', `row_id` INTEGER NOT NULL, `row_list_id` INTEGER NOT NULL, `row_uid` TEXT NOT NULL, `row_href` TEXT, `row_etag` TEXT, `row_title` TEXT, `row_description` TEXT, `row_location` TEXT, `row_url` TEXT, `row_color` INTEGER, `row_categories` TEXT NOT NULL DEFAULT '', `row_status` INTEGER NOT NULL DEFAULT 0, `row_percent_complete` INTEGER, `row_completed_at` INTEGER, `row_priority` INTEGER NOT NULL DEFAULT 0, `row_classification` INTEGER, `row_dtstart` INTEGER, `row_due` INTEGER, `row_duration` TEXT, `row_is_all_day` INTEGER NOT NULL DEFAULT 0, `row_untimed` TEXT, `row_timezone` TEXT, `row_rrule` TEXT, `row_rdate` TEXT, `row_exdate` TEXT, `row_recurrence_id` INTEGER, `row_master_id` INTEGER, `row_parent_id` INTEGER, `row_sort_order` INTEGER NOT NULL DEFAULT 0, `row_created_at` INTEGER, `row_last_modified` INTEGER, `row_sequence` INTEGER NOT NULL DEFAULT 0, `row_is_dirty` INTEGER NOT NULL DEFAULT 0, `row_is_deleted` INTEGER NOT NULL DEFAULT 0, `row_unknown_properties` TEXT, `row_reminders_off` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY(`copy_id`) REFERENCES `advanced_occurrences`(`copy_id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
||||
"CREATE TABLE IF NOT EXISTS `advanced_deleted` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `copy_id` INTEGER NOT NULL, `anchor` INTEGER NOT NULL, `vtodo` TEXT NOT NULL, `color` INTEGER, `sort_order` INTEGER NOT NULL DEFAULT 0, `reminders_off` INTEGER NOT NULL DEFAULT 0, `alarms` TEXT NOT NULL DEFAULT '', FOREIGN KEY(`copy_id`) REFERENCES `advanced_occurrences`(`copy_id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
||||
)
|
||||
db.execSQL("CREATE INDEX IF NOT EXISTS `index_advanced_deleted_copy_id` ON `advanced_deleted` (`copy_id`)")
|
||||
}
|
||||
|
||||
+47
@@ -1,7 +1,10 @@
|
||||
package de.jeanlucmakiola.agendula.data.tasks.room
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import de.jeanlucmakiola.agendula.domain.TaskEnd
|
||||
import de.jeanlucmakiola.agendula.domain.TaskStatus
|
||||
import org.junit.jupiter.api.Test
|
||||
import kotlin.time.Instant
|
||||
|
||||
class AdvancedDeletedEntityTest {
|
||||
|
||||
@@ -24,4 +27,48 @@ class AdvancedDeletedEntityTest {
|
||||
fun noAlarmsDecodeToNone() {
|
||||
assertThat(AdvancedDeletedEntity.decodeAlarms(AdvancedDeletedEntity.encodeAlarms(emptyList()), taskId = 1)).isEmpty()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun aDeletedOverrideReadsBackAsItStood() {
|
||||
val at = Instant.parse("2026-11-20T09:00:00Z")
|
||||
val row = TaskEntity(
|
||||
id = 42,
|
||||
listId = 3,
|
||||
uid = "series-1",
|
||||
href = "/x.ics",
|
||||
etag = "\"e\"",
|
||||
title = "Just this once, really",
|
||||
description = "line one\nline two; with a comma, too",
|
||||
location = "Room 4",
|
||||
url = "https://example.org/?a=1&b=2",
|
||||
color = 0xFF336699.toInt(),
|
||||
categories = listOf("home", "errands"),
|
||||
status = TaskStatus.IN_PROCESS,
|
||||
percentComplete = 40,
|
||||
priority = 3,
|
||||
classification = 1,
|
||||
dtstart = at,
|
||||
due = Instant.parse("2026-11-20T22:59:59Z"),
|
||||
untimed = TaskEnd.DUE,
|
||||
timezone = "Europe/Berlin",
|
||||
recurrenceId = at,
|
||||
masterId = 7,
|
||||
sortOrder = 5,
|
||||
createdAt = Instant.parse("2026-11-01T08:00:00Z"),
|
||||
lastModified = Instant.parse("2026-11-19T08:00:00Z"),
|
||||
sequence = 2,
|
||||
unknownProperties = "X-CUSTOM;X-PARAM=1:kept\r\n",
|
||||
remindersOff = true,
|
||||
)
|
||||
val alarm = TaskAlarmEntity(taskId = 42, minutesBefore = 15, reference = AlarmReference.START)
|
||||
|
||||
val stored = AdvancedDeletedEntity.of(copyId = 9, anchor = at, row = row, alarms = listOf(alarm))
|
||||
val back = checkNotNull(stored.read())
|
||||
|
||||
assertThat(back.entity.copy(listId = row.listId, id = row.id, href = row.href, etag = row.etag, masterId = row.masterId))
|
||||
.isEqualTo(row)
|
||||
assertThat(back.alarms).isEmpty()
|
||||
assertThat(AdvancedDeletedEntity.decodeAlarms(stored.alarms, taskId = 1).map { it.minutesBefore to it.reference })
|
||||
.containsExactly(15 to AlarmReference.START)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user