From 18f5f6ca27f47eaccb234d57a3a6350e03e504f6 Mon Sep 17 00:00:00 2001 From: Marat Al Date: Mon, 9 Oct 2023 22:43:42 +0200 Subject: [PATCH] Added resumed=true check (callbacks should not be called). --- Test/Tests/RealtimeClientChannelTests.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Test/Tests/RealtimeClientChannelTests.swift b/Test/Tests/RealtimeClientChannelTests.swift index b58048686..d5bb95de7 100644 --- a/Test/Tests/RealtimeClientChannelTests.swift +++ b/Test/Tests/RealtimeClientChannelTests.swift @@ -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) }