From 9184efa3eece85f60db12d0cf69cada8a6ba5319 Mon Sep 17 00:00:00 2001 From: Marat Al Date: Mon, 9 Oct 2023 01:50:27 +0200 Subject: [PATCH] Updated assertions on RTL12. --- Test/Tests/RealtimeClientChannelTests.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Test/Tests/RealtimeClientChannelTests.swift b/Test/Tests/RealtimeClientChannelTests.swift index 98fe361a5..b58048686 100644 --- a/Test/Tests/RealtimeClientChannelTests.swift +++ b/Test/Tests/RealtimeClientChannelTests.swift @@ -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() }