Skip to content

Commit 7b7f672

Browse files
committed
Adds test for streamGroupMessages
1 parent 5da219a commit 7b7f672

File tree

1 file changed

+14
-0
lines changed
  • library/src/androidTest/java/org/xmtp/android/library

1 file changed

+14
-0
lines changed

library/src/androidTest/java/org/xmtp/android/library/GroupTest.kt

+14
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,20 @@ class GroupTest {
379379
}
380380
}
381381

382+
@Test
383+
fun testCanStreamDecryptedGroupMessagesFromSelf() = kotlinx.coroutines.test.runTest {
384+
val group = boClient.conversations.newGroup(listOf(alix.walletAddress))
385+
alixClient.conversations.syncGroups()
386+
val alixGroup = alixClient.conversations.listGroups().first()
387+
group.streamDecryptedMessages().test {
388+
389+
alixGroup.send("hi")
390+
assertEquals("hi", awaitItem().encodedContent.content.toStringUtf8())
391+
group.send("hi from self")
392+
assertEquals("hi from self", awaitItem().encodedContent.content.toStringUtf8())
393+
}
394+
}
395+
382396
@Test
383397
fun testCanStreamAllDecryptedGroupMessages() = kotlinx.coroutines.test.runTest {
384398
val group = caroClient.conversations.newGroup(listOf(alix.walletAddress))

0 commit comments

Comments
 (0)