|
|
|
@ -183,6 +183,21 @@ class GoogleTaskDaoTests : InjectingTestCase() {
|
|
|
|
assertEquals("abcd", googleTaskDao.getByTaskId(1)!!.remoteParent)
|
|
|
|
assertEquals("abcd", googleTaskDao.getByTaskId(1)!!.remoteParent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
fun ignoreSelfParent() = runBlocking {
|
|
|
|
|
|
|
|
insert(
|
|
|
|
|
|
|
|
newCaldavTask(
|
|
|
|
|
|
|
|
with(TASK, 1),
|
|
|
|
|
|
|
|
with(REMOTE_ID, "123"),
|
|
|
|
|
|
|
|
with(REMOTE_PARENT, "123")
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
caldavDao.updateParents()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals(0, taskDao.fetch(1)!!.parent)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
fun updateParents() = runBlocking {
|
|
|
|
fun updateParents() = runBlocking {
|
|
|
|
insert(newCaldavTask(with(TASK, 1), with(REMOTE_ID, "123")))
|
|
|
|
insert(newCaldavTask(with(TASK, 1), with(REMOTE_ID, "123")))
|
|
|
|
|