Skip to content

Commit

Permalink
RTL2c
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardopereira committed Feb 23, 2016
1 parent 7e46202 commit 39ff121
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ablySpec/RealtimeClientChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,24 @@ class RealtimeClientChannel: QuickSpec {
expect(channel.state).toEventually(equal(ARTRealtimeChannelState.Attached), timeout: testTimeout)
}

// RTL2c
it("should contain an ErrorInfo object with details when an error occurs") {
let client = ARTRealtime(options: AblyTests.commonAppSetup())
defer { client.close() }
let channel = client.channels.get("test")

let error = AblyTests.newErrorProtocolMessage()

waitUntil(timeout: testTimeout) { done in
channel.on(.Failed) { errorInfo in
expect(errorInfo).to(equal(error.error))
expect(channel.errorReason).to(equal(error.error))
done()
}
channel.onError(error)
}
}

}

// RTL3
Expand Down

0 comments on commit 39ff121

Please sign in to comment.