Skip to content

Commit

Permalink
Merge pull request #349 from ably/rsa8f2
Browse files Browse the repository at this point in the history
RSA8f2
  • Loading branch information
ricardopereira committed Apr 8, 2016
2 parents f8a1f86 + 6424918 commit 614995b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Spec/Auth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,23 @@ class Auth : QuickSpec {

}

// RSA8f2
it("ensure that the message is rejected") {
let options = AblyTests.commonAppSetup()
options.token = getTestToken(clientId: nil)
let rest = ARTRest(options: options)
let channel = rest.channels.get("test")

waitUntil(timeout: testTimeout) { done in
let message = ARTMessage(name: nil, data: "message with an explicit clientId", clientId: "john")
channel.publish([message]) { error in
expect(error!.message).to(contain("mismatched clientId"))
done()
}
}
expect(rest.auth.clientId).to(beNil())
}

// RSA8f4
it("ensure the message published with a wildcard '*' has the provided clientId") {
let options = AblyTests.commonAppSetup()
Expand Down

0 comments on commit 614995b

Please sign in to comment.