This commit is contained in:
parent
284c19ef89
commit
64adc7baf4
@ -985,16 +985,7 @@ class RepositoryTest {
|
||||
)
|
||||
|
||||
initializeRepository()
|
||||
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"
|
||||
prepareSearch()
|
||||
runBlocking {
|
||||
repository.tryToCacheItemsAndGetNewOnes()
|
||||
}
|
||||
@ -1008,16 +999,7 @@ class RepositoryTest {
|
||||
StatusAndData(success = false, data = generateTestApiItem())
|
||||
|
||||
initializeRepository()
|
||||
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"
|
||||
prepareSearch()
|
||||
runBlocking {
|
||||
repository.tryToCacheItemsAndGetNewOnes()
|
||||
}
|
||||
@ -1031,20 +1013,26 @@ class RepositoryTest {
|
||||
StatusAndData(success = false, data = generateTestApiItem())
|
||||
|
||||
initializeRepository(MutableStateFlow(false))
|
||||
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"
|
||||
prepareSearch()
|
||||
runBlocking {
|
||||
repository.tryToCacheItemsAndGetNewOnes()
|
||||
}
|
||||
|
||||
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