Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RTL4b: use client.channels.get. #199

Merged
merged 1 commit into from
Feb 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions ablySpec/RealtimeClientChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class RealtimeClientChannel: QuickSpec {
client.connect()
defer { client.close() }

let channel = client.channel("test")
let channel = client.channels.get("test")
channel.attach()
let transport = client.transport as! TestProxyTransport
transport.actionsIgnored += [.Attached]
Expand All @@ -161,7 +161,7 @@ class RealtimeClientChannel: QuickSpec {
let client = ARTRealtime(options: options)
defer { client.close() }

let channel = client.channel("test")
let channel = client.channels.get("test")
channel.attach()
expect(channel.state).toEventually(equal(ARTRealtimeChannelState.Attached), timeout: testTimeout)
client.onSuspended()
Expand All @@ -181,7 +181,7 @@ class RealtimeClientChannel: QuickSpec {
client.connect()
defer { client.close() }

let channel = client.channel("test")
let channel = client.channels.get("test")
channel.attach()
let transport = client.transport as! TestProxyTransport
transport.actionsIgnored += [.Attached]
Expand All @@ -198,7 +198,7 @@ class RealtimeClientChannel: QuickSpec {
let client = ARTRealtime(options: options)
defer { client.close() }

let channel = client.channel("test")
let channel = client.channels.get("test")
channel.attach()

expect(channel.state).toEventually(equal(ARTRealtimeChannelState.Attached), timeout: testTimeout)
Expand Down Expand Up @@ -230,7 +230,7 @@ class RealtimeClientChannel: QuickSpec {
let transport = client.transport as! TestProxyTransport
transport.actionsIgnored += [.Closed]

let channel = client.channel("test")
let channel = client.channels.get("test")

client.close()
expect(client.connection().state).to(equal(ARTRealtimeConnectionState.Closing))
Expand All @@ -242,7 +242,7 @@ class RealtimeClientChannel: QuickSpec {
let client = ARTRealtime(options: AblyTests.commonAppSetup())
defer { client.close() }

let channel = client.channel("test")
let channel = client.channels.get("test")

client.close()
expect(client.connection().state).toEventually(equal(ARTRealtimeConnectionState.Closed), timeout: testTimeout)
Expand All @@ -254,7 +254,7 @@ class RealtimeClientChannel: QuickSpec {
let client = ARTRealtime(options: AblyTests.commonAppSetup())
defer { client.close() }

let channel = client.channel("test")
let channel = client.channels.get("test")
client.onSuspended()
expect(client.connection().state).to(equal(ARTRealtimeConnectionState.Suspended))
expect(channel.attach()).toNot(beNil())
Expand All @@ -264,7 +264,7 @@ class RealtimeClientChannel: QuickSpec {
let client = ARTRealtime(options: AblyTests.commonAppSetup())
defer { client.close() }

let channel = client.channel("test")
let channel = client.channels.get("test")
client.onError(AblyTests.newErrorProtocolMessage())
expect(client.connection().state).to(equal(ARTRealtimeConnectionState.Failed))
expect(channel.attach()).toNot(beNil())
Expand Down