Skip to content

Commit

Permalink
write a test for it
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Feb 14, 2024
1 parent 48e55dc commit 344972a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Tests/XMTPTests/GroupTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,20 @@ class GroupTests: XCTestCase {
XCTAssertEqual(1, aliceGroupCount)
XCTAssertEqual(1, bobGroupCount)
}

func testCanListGroupsAndConversations() async throws {
let fixtures = try await localFixtures()
_ = try await fixtures.aliceClient.conversations.newGroup(with: [fixtures.bob.address])
_ = try await fixtures.aliceClient.conversations.newConversation(with: fixtures.bob.address)

let aliceGroupCount = try await fixtures.aliceClient.conversations.list(includeGroups: true).count

try await fixtures.bobClient.conversations.sync()
let bobGroupCount = try await fixtures.bobClient.conversations.list(includeGroups: true).count

XCTAssertEqual(2, aliceGroupCount)
XCTAssertEqual(2, bobGroupCount)
}

func testCanListGroupMembers() async throws {
let fixtures = try await localFixtures()
Expand Down

0 comments on commit 344972a

Please sign in to comment.