Allow offline filtering #75

Merged
AmineB merged 6 commits from davidoskky/ReaderForSelfoss-multiplatform:offline_filters into master 2022-10-14 07:18:43 +00:00
Showing only changes of commit 208babbce3 - Show all commits

View File

@ -179,12 +179,12 @@ class RepositoryTest() {
val itemParameter2 = FakeItemParameters()
val itemParameter3 = FakeItemParameters()
itemParameter2.tags = "Test, Stuff"
itemParameter2.id = "2"
itemParameter3.tags = "Other, Tag"
coEvery { db.itemsQueries.items().executeAsList() } returnsMany listOf(
generateTestDBItems(itemParameter1),
generateTestDBItems(itemParameter2),
itemParameter3.id = "3"
coEvery { db.itemsQueries.items().executeAsList() } returns generateTestDBItems(itemParameter1) +
generateTestDBItems(itemParameter2) +
generateTestDBItems(itemParameter3)
)
every { connectivityStatus.isNetworkConnected } returns MutableStateFlow(false)
every { appSettingsService.isItemCachingEnabled() } returns true
@ -206,12 +206,12 @@ class RepositoryTest() {
val itemParameter2 = FakeItemParameters()
val itemParameter3 = FakeItemParameters()
itemParameter2.sourcetitle = "Test"
itemParameter2.id = "2"
itemParameter3.sourcetitle = "Other"
coEvery { db.itemsQueries.items().executeAsList() } returnsMany listOf(
generateTestDBItems(itemParameter1),
generateTestDBItems(itemParameter2),
generateTestDBItems(itemParameter3)
)
itemParameter3.id = "3"
coEvery { db.itemsQueries.items().executeAsList() } returns generateTestDBItems(itemParameter1) +
generateTestDBItems(itemParameter2) +
generateTestDBItems(itemParameter3)
every { connectivityStatus.isNetworkConnected } returns MutableStateFlow(false)
every { appSettingsService.isItemCachingEnabled() } returns true