Fix API tests

This commit is contained in:
Shinokuni 2024-08-12 14:29:51 +02:00
parent f67f817b82
commit e9b3a26074
2 changed files with 11 additions and 1 deletions

View File

@ -111,6 +111,10 @@ class FeverDataSourceTest : KoinTest {
MockResponse.okResponseWithBody(TestUtils.loadResource("services/fever/folders.json"))
}
this == "/?favicons" -> {
MockResponse.okResponseWithBody(TestUtils.loadResource("services/fever/favicons.json"))
}
this == "/?unread_item_ids" -> {
MockResponse.okResponseWithBody(TestUtils.loadResource("services/fever/itemsIds.json"))
}
@ -148,6 +152,7 @@ class FeverDataSourceTest : KoinTest {
assertEquals(1, result.folders.size)
assertEquals(1, result.feverFeeds.feeds.size)
assertEquals(3, result.favicons.size)
assertEquals(6, result.unreadIds.size)
assertEquals(6, result.starredIds.size)
assertEquals(10, result.items.size)
@ -179,6 +184,10 @@ class FeverDataSourceTest : KoinTest {
MockResponse.okResponseWithBody(TestUtils.loadResource("services/fever/folders.json"))
}
this == "/?favicons" -> {
MockResponse.okResponseWithBody(TestUtils.loadResource("services/fever/favicons.json"))
}
this == "/?unread_item_ids" -> {
MockResponse.okResponseWithBody(TestUtils.loadResource("services/fever/itemsIds.json"))
}
@ -216,6 +225,7 @@ class FeverDataSourceTest : KoinTest {
assertEquals(1, result.folders.size)
assertEquals(1, result.feverFeeds.feeds.size)
assertEquals(3, result.favicons.size)
assertEquals(6, result.unreadIds.size)
assertEquals(6, result.starredIds.size)
assertEquals(10, result.items.size)

View File

@ -25,7 +25,7 @@ class FeverFaviconsAdapterTest {
assertEquals(favicons.size, 3)
with(favicons[0]) {
assertEquals(id, 85)
assertEquals(id, "85")
assertNotNull(data)
}
}