Skip to content

Commit

Permalink
Updated assertions on RTL12.
Browse files Browse the repository at this point in the history
  • Loading branch information
maratal committed Oct 8, 2023
1 parent 1a5f933 commit 9184efa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Test/Tests/RealtimeClientChannelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3721,10 +3721,13 @@ class RealtimeClientChannelTests: XCTestCase {
attachedMessageWithError.action = .attached
attachedMessageWithError.channel = channel.name

channel.once(.update) { stateChange in
channel.on { stateChange in
XCTAssertEqual(stateChange.event, ARTChannelEvent.update)
XCTAssertEqual(stateChange.current, ARTRealtimeChannelState.attached)
XCTAssertEqual(stateChange.previous, ARTRealtimeChannelState.attached)
XCTAssertTrue(stateChange.reason === attachedMessageWithError.error)
XCTAssertTrue(channel.errorReason === stateChange.reason)
XCTAssertTrue(stateChange.reason === channel.errorReason)
XCTAssertFalse(stateChange.resumed)
done()
}

Expand Down

0 comments on commit 9184efa

Please sign in to comment.