Skip to content

Commit

Permalink
Merge pull request #196 from ably/RTL6e
Browse files Browse the repository at this point in the history
RTL6e
  • Loading branch information
ricardopereira committed Feb 8, 2016
2 parents e7019d4 + 297b4d5 commit ed021e3
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions ablySpec/RealtimeClientChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,36 @@ class RealtimeClientChannel: QuickSpec {

}

// RTL6e
context("Unidentified clients using Basic Auth") {

// RTL6e1
pending("should have the provided clientId on received message when it was published with clientId") {
let client = ARTRealtime(options: AblyTests.commonAppSetup())
defer { client.close() }

expect(client.auth().clientId).to(beNil())

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

var resultClientId: String?
channel.subscribe { message, errorInfo in
expect(errorInfo).to(beNil())
resultClientId = message.clientId
}

let message = ARTMessage(data: "message", name: nil)
message.clientId = "client_string"

channel.publish(message, cb: { status in
expect(status.state).to(equal(ARTState.Ok))
})

expect(resultClientId).toEventually(equal(message.clientId), timeout: testTimeout)
}

}

}

}
Expand Down

0 comments on commit ed021e3

Please sign in to comment.