-
Notifications
You must be signed in to change notification settings - Fork 26
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
Push Activation State Machine missing tests #720
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I left a couple of minor comments.
// RSH3g | ||
context("State WaitingForDeregistration") { | ||
// RSH3f | ||
context("State AfterRegistrationUpdateFailed") { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra whitespace
|
||
let deviceIdentityToken = stateMachine.rest.device.identityTokenDetails?.token.base64Encoded() | ||
|
||
let simulatedError = NSError(domain: ARTAblyErrorDomain, code: 1234, userInfo: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is repeated quite often. I suggest to have a createError()
helper function.
} | ||
} | ||
stateMachine.send(ARTPushActivationEventCalledActivate()) | ||
expect(stateMachine.current).to(beAKindOf(ARTPushActivationStateWaitingForRegistrationUpdate.self)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is repeated below on line 876
stateMachine.send(ARTPushActivationEventDeregistrationFailed(error: expectedError)) | ||
expect(stateMachine.current).to(beAKindOf(ARTPushActivationStateWaitingForDeregistration.self)) | ||
expect(deactivatedCallbackCalled).to(beTrue()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is missing a test for RSH3g3b
} | ||
|
||
// RSH5 | ||
it("event handling sould be atomic and sequential") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo "should"
7163969
to
ca29f73
Compare
Rebased on |
Failing tests https://travis-ci.org/ably/ably-ios/builds/403176500 have already been fixed in this PR #708 |
No description provided.