Skip to content

Commit

Permalink
update the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Jan 7, 2025
1 parent 3735183 commit 4fd6846
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
9 changes: 1 addition & 8 deletions Tests/XMTPTests/ConversationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,10 @@ class ConversationTests: XCTestCase {

let conversations = try await fixtures.boClient.conversations
.list()
let conversationsOrdered = try await fixtures.boClient.conversations
.list(order: .lastMessage)

XCTAssertEqual(conversations.count, 3)
XCTAssertEqual(conversationsOrdered.count, 3)

XCTAssertEqual(
conversations.map { $0.id }, [dm.id, group1.id, group2.id])
XCTAssertEqual(
conversationsOrdered.map { $0.id },
[group2.id, dm.id, group1.id])
conversations.map { $0.id }, [group2.id, dm.id, group1.id])
}

func testCanStreamConversations() async throws {
Expand Down
10 changes: 1 addition & 9 deletions Tests/XMTPTests/DmTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,9 @@ class DmTests: XCTestCase {

let conversations = try await fixtures.boClient.conversations
.listDms()
let conversationsOrdered = try await fixtures.boClient.conversations
.listDms(order: .lastMessage)

XCTAssertEqual(conversations.count, 2)
XCTAssertEqual(conversationsOrdered.count, 2)

XCTAssertEqual(
try conversations.map { try $0.id }, [dm.id, dm2.id])
XCTAssertEqual(
try conversationsOrdered.map { try $0.id },
[dm2.id, dm.id])
try conversations.map { try $0.id }, [dm2.id, dm.id])
}

func testCanSendMessageToDm() async throws {
Expand Down
9 changes: 1 addition & 8 deletions Tests/XMTPTests/GroupTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,10 @@ class GroupTests: XCTestCase {

let conversations = try await fixtures.boClient.conversations
.listGroups()
let conversationsOrdered = try await fixtures.boClient.conversations
.listGroups(order: .lastMessage)

XCTAssertEqual(conversations.count, 2)
XCTAssertEqual(conversationsOrdered.count, 2)

XCTAssertEqual(
conversations.map { $0.id }, [group1.id, group2.id])
XCTAssertEqual(
conversationsOrdered.map { $0.id },
[group2.id, group1.id])
conversations.map { $0.id }, [group2.id, group1.id])
}

func testCanListGroupMembers() async throws {
Expand Down

0 comments on commit 4fd6846

Please sign in to comment.