Skip to content

Commit

Permalink
fix up failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Feb 18, 2024
1 parent 4e62ae7 commit f90494d
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,22 +251,25 @@ class GroupTest {
@Test
fun testCanStreamGroupMessages() = kotlinx.coroutines.test.runTest {
val group = boClient.conversations.newGroup(listOf(alix.walletAddress.lowercase()))
alixClient.conversations.syncGroups()
val alixGroup = alixClient.conversations.listGroups().first()
group.streamMessages().test {
group.send("hi")
alixGroup.send("hi")
assertEquals("hi", awaitItem().body)
group.send("hi again")
alixGroup.send("hi again")
assertEquals("hi again", awaitItem().body)
}
}

@Test
fun testCanStreamDecryptedGroupMessages() = kotlinx.coroutines.test.runTest {
val group = boClient.conversations.newGroup(listOf(alix.walletAddress))

alixClient.conversations.syncGroups()
val alixGroup = alixClient.conversations.listGroups().first()
group.streamDecryptedMessages().test {
group.send("hi")
alixGroup.send("hi")
assertEquals("hi", awaitItem().encodedContent.content.toStringUtf8())
group.send("hi again")
alixGroup.send("hi again")
assertEquals("hi again", awaitItem().encodedContent.content.toStringUtf8())
}
}
Expand Down

0 comments on commit f90494d

Please sign in to comment.