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

RTN4e #480

Merged
merged 1 commit into from
Sep 7, 2016
Merged

RTN4e #480

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
22 changes: 22 additions & 0 deletions Spec/RealtimeClientConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,28 @@ class RealtimeClientConnection: QuickSpec {
}
}

// RTN4e
it("should have a ConnectionStateChange as first argument for every connection state change") {
let options = AblyTests.commonAppSetup()
options.autoConnect = false
let client = ARTRealtime(options: options)
defer { client.dispose(); client.close() }

waitUntil(timeout: testTimeout) { done in
client.connection.once(.Connected) { stateChange in
guard let stateChange = stateChange else {
fail("ConnectionStateChange is empty"); done()
return
}
expect(stateChange).to(beAKindOf(ARTConnectionStateChange))
expect(stateChange.current).to(equal(ARTRealtimeConnectionState.Connected))
expect(stateChange.previous).to(equal(ARTRealtimeConnectionState.Connecting))
done()
}
client.connect()
}
}

// RTN4f
it("should have the reason which contains an ErrorInfo") {
let options = AblyTests.commonAppSetup()
Expand Down