mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 12:17:02 +05:30
fix(model): adjust for new comments structure
This commit is contained in:
parent
43402f45d8
commit
9dcf26b5a4
3 changed files with 3 additions and 3 deletions
|
@ -40,7 +40,7 @@ class ApiTest {
|
||||||
fun `post details with comments`() = runTest {
|
fun `post details with comments`() = runTest {
|
||||||
val postDetails = api.getPostDetails("tdfoqh")
|
val postDetails = api.getPostDetails("tdfoqh")
|
||||||
assertIs<Success<LobstersPostDetails>>(postDetails)
|
assertIs<Success<LobstersPostDetails>>(postDetails)
|
||||||
assertThat(postDetails.value.comments).hasSize(7)
|
assertThat(postDetails.value.comments).hasSize(10)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -23,6 +23,6 @@ class Comment(
|
||||||
val score: Int,
|
val score: Int,
|
||||||
@Serializable(with = JavaInstantSerializer::class) val createdAt: TemporalAccessor,
|
@Serializable(with = JavaInstantSerializer::class) val createdAt: TemporalAccessor,
|
||||||
@Serializable(with = JavaInstantSerializer::class) val updatedAt: TemporalAccessor,
|
@Serializable(with = JavaInstantSerializer::class) val updatedAt: TemporalAccessor,
|
||||||
val indentLevel: Int,
|
val parentComment: String?,
|
||||||
@SerialName("commenting_user") val user: User,
|
@SerialName("commenting_user") val user: User,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue