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

RSL1g4 #362

Merged
merged 7 commits into from
Apr 9, 2016
Merged

RSL1g4 #362

merged 7 commits into from
Apr 9, 2016

Conversation

ricardopereira
Copy link
Contributor

No description provided.

@mattheworiordan
Copy link
Member

The only issue I can see is that there is no way to be sure that the test is not rejecting the message because the server is rejecting it, or as intended by the spec, the client lib is rejecting it. Can you somehow ensure that the message is never sent to the server i.e. rejected before that happens?

@ricardopereira
Copy link
Contributor Author

@mattheworiordan @tcard PTAL.

case .Failure(let error):
fail(error)
case .Success(let rawMessages):
expect(rawMessages.unbox.first!["clientId"] as? String).to(equal("tester"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I get this. The spec says that the library should catch the error, so the request this block is intercepting shouldn't happen, isn't that right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, the library should catch the error before sending the request, thus failing early and preventing it from happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you right. The request shouldn't happen. Fixed 436b265.

@ricardopereira
Copy link
Contributor Author

@tcard PTAL

@tcard
Copy link
Contributor

tcard commented Apr 8, 2016

LGTM, but isn't this doing exactly the same as #361 ?

@ricardopereira
Copy link
Contributor Author

Quite but RSL1g3 is checking if the connection and channel remains active.

@ricardopereira ricardopereira merged commit 2e3fc69 into master Apr 9, 2016
@ricardopereira ricardopereira deleted the rsl1g4 branch April 9, 2016 14:42
tcard pushed a commit that referenced this pull request May 16, 2016
* RSL1g4

* Test suite: MockHTTPExecutor can ignore the http request

 - added `beforeRequest` event

* Fix RSL1g4: should reject the clientId before the message is sent to the server

* RSL1g4: pending

* TestSuite: injectIntoMethodBefore

* Reject the message immediately if the clientId doesn't match

* Fix RSL1g4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants