Fixing tests.

This commit is contained in:
aminecmi 2022-12-06 22:36:15 +01:00
parent d6a562863a
commit 89c570f34f

View File

@ -196,7 +196,7 @@ class RepositoryTest {
every { appSettingsService.isItemCachingEnabled() } returns true
initializeRepository(MutableStateFlow(false))
repository.tagFilter = SelfossModel.Tag("Test", "red", 3)
repository.tagFilter = MutableStateFlow(SelfossModel.Tag("Test", "red", 3))
runBlocking {
repository.getNewerItems()
}
@ -224,13 +224,15 @@ class RepositoryTest {
every { appSettingsService.isItemCachingEnabled() } returns true
initializeRepository(MutableStateFlow(false))
repository.sourceFilter = SelfossModel.Source(
1,
"Test",
listOf("tags"),
"spouts\\rss\\fulltextrss",
"",
"b3aa8a664d08eb15d6ff1db2fa83e0d9.png"
repository.sourceFilter = MutableStateFlow(
SelfossModel.Source(
1,
"Test",
listOf("tags"),
"spouts\\rss\\fulltextrss",
"",
"b3aa8a664d08eb15d6ff1db2fa83e0d9.png"
)
)
runBlocking {
repository.getNewerItems()
@ -1302,14 +1304,16 @@ class RepositoryTest {
)
initializeRepository()
repository.tagFilter = SelfossModel.Tag("Tag", "read", 0)
repository.sourceFilter = SelfossModel.Source(
1,
"First source",
listOf("Test", "second"),
"spouts\\rss\\fulltextrss",
"",
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
repository.tagFilter = MutableStateFlow(SelfossModel.Tag("Tag", "read", 0))
repository.sourceFilter = MutableStateFlow(
SelfossModel.Source(
1,
"First source",
listOf("Test", "second"),
"spouts\\rss\\fulltextrss",
"",
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
)
)
repository.searchFilter = "search"
runBlocking {
@ -1325,14 +1329,16 @@ class RepositoryTest {
StatusAndData(success = false, data = generateTestApiItem())
initializeRepository()
repository.tagFilter = SelfossModel.Tag("Tag", "read", 0)
repository.sourceFilter = SelfossModel.Source(
1,
"First source",
listOf("Test", "second"),
"spouts\\rss\\fulltextrss",
"",
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
repository.tagFilter = MutableStateFlow(SelfossModel.Tag("Tag", "read", 0))
repository.sourceFilter = MutableStateFlow(
SelfossModel.Source(
1,
"First source",
listOf("Test", "second"),
"spouts\\rss\\fulltextrss",
"",
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
)
)
repository.searchFilter = "search"
runBlocking {
@ -1348,14 +1354,16 @@ class RepositoryTest {
StatusAndData(success = false, data = generateTestApiItem())
initializeRepository(MutableStateFlow(false))
repository.tagFilter = SelfossModel.Tag("Tag", "read", 0)
repository.sourceFilter = SelfossModel.Source(
1,
"First source",
listOf("Test", "second"),
"spouts\\rss\\fulltextrss",
"",
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
repository.tagFilter = MutableStateFlow(SelfossModel.Tag("Tag", "read", 0))
repository.sourceFilter = MutableStateFlow(
SelfossModel.Source(
1,
"First source",
listOf("Test", "second"),
"spouts\\rss\\fulltextrss",
"",
"d8c92cdb1ef119ea85c4b9205c879ca7.png"
)
)
repository.searchFilter = "search"
runBlocking {