Skip to content

Commit

Permalink
Added resumed=true check (callbacks should not be called).
Browse files Browse the repository at this point in the history
  • Loading branch information
maratal committed Oct 9, 2023
1 parent 9184efa commit 18f5f6c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Test/Tests/RealtimeClientChannelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3733,6 +3733,14 @@ class RealtimeClientChannelTests: XCTestCase {

// Inject additional ATTACHED action with an error
client.internal.transport?.receive(attachedMessageWithError)

let attachedMessage = ARTProtocolMessage()
attachedMessage.action = .attached
attachedMessage.channel = channel.name
attachedMessage.flags = 4 // resume

// Inject another ATTACHED action with resume flag, should not generate neither .attached nor .update events
client.internal.transport?.receive(attachedMessage)
}
XCTAssertEqual(channel.state, ARTRealtimeChannelState.attached)
}
Expand Down

0 comments on commit 18f5f6c

Please sign in to comment.