mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 05:17:03 +05:30
api: update LobstersApiTest for stripped models
This commit is contained in:
parent
968759c7ea
commit
00735cc194
1 changed files with 0 additions and 9 deletions
|
@ -4,7 +4,6 @@ import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFact
|
||||||
import dev.msfjarvis.claw.util.TestUtils
|
import dev.msfjarvis.claw.util.TestUtils
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
import kotlin.test.assertTrue
|
|
||||||
import kotlin.test.fail
|
import kotlin.test.fail
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import kotlinx.serialization.ExperimentalSerializationApi
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
|
@ -70,13 +69,6 @@ class LobstersApiTest {
|
||||||
assertEquals(25, posts.size)
|
assertEquals(25, posts.size)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `no moderator posts in test data`() = runBlocking {
|
|
||||||
val posts = apiClient.getHottestPosts(1)
|
|
||||||
val moderatorPosts = posts.asSequence().filter { it.submitter.isModerator }.toSet()
|
|
||||||
assertTrue(moderatorPosts.isEmpty())
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `posts with no urls`() = runBlocking {
|
fun `posts with no urls`() = runBlocking {
|
||||||
val posts = apiClient.getHottestPosts(1)
|
val posts = apiClient.getHottestPosts(1)
|
||||||
|
@ -87,7 +79,6 @@ class LobstersApiTest {
|
||||||
@Test
|
@Test
|
||||||
fun `post details with comments`() = runBlocking {
|
fun `post details with comments`() = runBlocking {
|
||||||
val postDetails = apiClient.getPostDetails("d9ucpe")
|
val postDetails = apiClient.getPostDetails("d9ucpe")
|
||||||
assertEquals(7, postDetails.commentCount)
|
|
||||||
assertEquals(7, postDetails.comments.size)
|
assertEquals(7, postDetails.comments.size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue