Fix tests

pull/2332/head
Alex Baker 2 years ago
parent 74a1ee9e4f
commit 08ae11046a

@ -218,7 +218,7 @@ class CaldavManualSortTaskAdapterTest : InjectingTestCase() {
}
private fun move(from: Int, to: Int, indent: Int = 0) = runBlocking {
tasks.addAll(taskDao.fetchTasks { getQuery(preferences, filter, it) })
tasks.addAll(taskDao.fetchTasks { getQuery(preferences, filter) })
val adjustedTo = if (from < to) to + 1 else to // match DragAndDropRecyclerAdapter behavior
adapter.moved(from, adjustedTo, indent)
}

@ -422,7 +422,7 @@ class GoogleTaskManualSortAdapterTest : InjectingTestCase() {
}
private fun move(from: Int, to: Int, indent: Int = 0) = runBlocking {
tasks.addAll(taskDao.fetchTasks { getQuery(preferences, filter, it) })
tasks.addAll(taskDao.fetchTasks { getQuery(preferences, filter) })
val adjustedTo = if (from < to) to + 1 else to
adapter.moved(from, adjustedTo, indent)
}

@ -86,6 +86,6 @@ class OfflineSubtaskTest : InjectingTestCase() {
}
private fun query() = runBlocking {
tasks.addAll(taskDao.fetchTasks { getQuery(preferences, filter, it) })
tasks.addAll(taskDao.fetchTasks { getQuery(preferences, filter) })
}
}

@ -76,7 +76,7 @@ class RecursiveLoopTest : InjectingTestCase() {
}
private suspend fun getTasks() = taskDao.fetchTasks {
getQuery(preferences, BuiltInFilterExposer.getTodayFilter(context.resources), it)
getQuery(preferences, BuiltInFilterExposer.getTodayFilter(context.resources))
}
private suspend fun addTask(vararg properties: PropertyValue<in Task?, *>): Long {

@ -105,6 +105,6 @@ class ManualGoogleTaskQueryTest : InjectingTestCase() {
}
private suspend fun query(): List<TaskContainer> = taskDao.fetchTasks {
TaskListQuery.getQuery(preferences, filter, it)
TaskListQuery.getQuery(preferences, filter)
}
}
Loading…
Cancel
Save