Skip to content

Commit

Permalink
all tests green
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Nov 7, 2024
1 parent c6013f1 commit c777c03
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions library/src/androidTest/java/org/xmtp/android/library/GroupTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,46 +54,6 @@ class GroupTest {
caroClient = fixtures.caroClient
}

@Test
fun testsCanDualSendConversations() {
val v2Convo = runBlocking { alixClient.conversations.newConversation(bo.walletAddress) }
runBlocking {
alixClient.conversations.syncConversations()
boClient.conversations.syncConversations()
}
val alixDm = runBlocking { alixClient.findDm(bo.walletAddress) }
val boDm = runBlocking { boClient.findDm(alix.walletAddress) }

assertEquals(alixDm?.id, boDm?.id)
assertEquals(runBlocking { alixClient.conversations.list().size }, 1)
assertEquals(runBlocking { alixClient.conversations.listDms().size }, 1)
assertEquals(runBlocking { boClient.conversations.listDms().size }, 1)
assertEquals(runBlocking { boClient.conversations.list().size }, 1)
assertEquals(v2Convo.topic, runBlocking { boClient.conversations.list().first().topic })
}

@Test
fun testsCanDualSendMessages() {
val alixV2Convo = runBlocking { alixClient.conversations.newConversation(bo.walletAddress) }
val boV2Convo = runBlocking { boClient.conversations.list().first() }
runBlocking { boClient.conversations.syncConversations() }
val alixDm = runBlocking { alixClient.findDm(bo.walletAddress) }
val boDm = runBlocking { boClient.findDm(alix.walletAddress) }

runBlocking { alixV2Convo.send("first") }
runBlocking { boV2Convo.send("second") }

runBlocking {
alixDm?.sync()
boDm?.sync()
}

assertEquals(runBlocking { alixV2Convo.messages().size }, 2)
assertEquals(runBlocking { alixV2Convo.messages().size }, runBlocking { boV2Convo.messages().size })
assertEquals(boDm?.messages()?.size, 2)
assertEquals(alixDm?.messages()?.size, 3) // We send the group membership update to the dm
}

@Test
fun testCanCreateAGroupWithDefaultPermissions() {
val boGroup = runBlocking {
Expand Down

0 comments on commit c777c03

Please sign in to comment.