This commit is contained in:
parent
284c19ef89
commit
64adc7baf4
@ -985,16 +985,7 @@ class RepositoryTest {
|
|||||||
)
|
)
|
||||||
|
|
||||||
initializeRepository()
|
initializeRepository()
|
||||||
repository.setTagFilter(SelfossModel.Tag("Tag", "read", 0))
|
prepareSearch()
|
||||||
repository.setSourceFilter(SelfossModel.Source(
|
|
||||||
1,
|
|
||||||
"First source",
|
|
||||||
listOf("Test", "second"),
|
|
||||||
"spouts\\rss\\fulltextrss",
|
|
||||||
"",
|
|
||||||
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
|
|
||||||
))
|
|
||||||
repository.searchFilter = "search"
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
repository.tryToCacheItemsAndGetNewOnes()
|
repository.tryToCacheItemsAndGetNewOnes()
|
||||||
}
|
}
|
||||||
@ -1008,16 +999,7 @@ class RepositoryTest {
|
|||||||
StatusAndData(success = false, data = generateTestApiItem())
|
StatusAndData(success = false, data = generateTestApiItem())
|
||||||
|
|
||||||
initializeRepository()
|
initializeRepository()
|
||||||
repository.setTagFilter(SelfossModel.Tag("Tag", "read", 0))
|
prepareSearch()
|
||||||
repository.setSourceFilter(SelfossModel.Source(
|
|
||||||
1,
|
|
||||||
"First source",
|
|
||||||
listOf("Test", "second"),
|
|
||||||
"spouts\\rss\\fulltextrss",
|
|
||||||
"",
|
|
||||||
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
|
|
||||||
))
|
|
||||||
repository.searchFilter = "search"
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
repository.tryToCacheItemsAndGetNewOnes()
|
repository.tryToCacheItemsAndGetNewOnes()
|
||||||
}
|
}
|
||||||
@ -1031,20 +1013,26 @@ class RepositoryTest {
|
|||||||
StatusAndData(success = false, data = generateTestApiItem())
|
StatusAndData(success = false, data = generateTestApiItem())
|
||||||
|
|
||||||
initializeRepository(MutableStateFlow(false))
|
initializeRepository(MutableStateFlow(false))
|
||||||
repository.setTagFilter(SelfossModel.Tag("Tag", "read", 0))
|
prepareSearch()
|
||||||
repository.setSourceFilter(SelfossModel.Source(
|
|
||||||
1,
|
|
||||||
"First source",
|
|
||||||
listOf("Test", "second"),
|
|
||||||
"spouts\\rss\\fulltextrss",
|
|
||||||
"",
|
|
||||||
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
|
|
||||||
))
|
|
||||||
repository.searchFilter = "search"
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
repository.tryToCacheItemsAndGetNewOnes()
|
repository.tryToCacheItemsAndGetNewOnes()
|
||||||
}
|
}
|
||||||
|
|
||||||
coVerify(exactly = 0) { api.getItems(any(), 0, null, null, null, null, 200) }
|
coVerify(exactly = 0) { api.getItems(any(), 0, null, null, null, null, 200) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun prepareSearch() {
|
||||||
|
repository.setTagFilter(SelfossModel.Tag("Tag", "read", 0))
|
||||||
|
repository.setSourceFilter(
|
||||||
|
SelfossModel.Source(
|
||||||
|
1,
|
||||||
|
"First source",
|
||||||
|
listOf("Test", "second"),
|
||||||
|
"spouts\\rss\\fulltextrss",
|
||||||
|
"",
|
||||||
|
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
repository.searchFilter = "search"
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user