Skip to content

Commit

Permalink
RTL6g2 (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardopereira authored and tcard committed Apr 27, 2016
1 parent 768a1d3 commit 5cbd468
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Spec/RealtimeClientChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,27 @@ class RealtimeClientChannel: QuickSpec {

}

// RTL6g2
it("when publishing a Message with the clientId attribute value set to the identified client’s clientId") {
let options = AblyTests.commonAppSetup()
options.clientId = "john"
let client = ARTRealtime(options: options)
defer { client.close() }
let channel = client.channels.get("test")

let message = ARTMessage(name: nil, data: "message", clientId: options.clientId!)
var resultClientId: String?
channel.subscribe() { message in
resultClientId = message.clientId
}

channel.publish([message]) { error in
expect(error).to(beNil())
}

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

}

// RTL6h
Expand Down

0 comments on commit 5cbd468

Please sign in to comment.