mirror of https://github.com/readrops/Readrops.git
Fix API tests
This commit is contained in:
parent
f67f817b82
commit
e9b3a26074
|
@ -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)
|
||||
|
|
|
@ -25,7 +25,7 @@ class FeverFaviconsAdapterTest {
|
|||
assertEquals(favicons.size, 3)
|
||||
|
||||
with(favicons[0]) {
|
||||
assertEquals(id, 85)
|
||||
assertEquals(id, "85")
|
||||
assertNotNull(data)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue