Skip to content

Commit

Permalink
Test suite: fix intermittent failure of "ARTPushRegistererDelegate mu…
Browse files Browse the repository at this point in the history
…st be implemented"
  • Loading branch information
ricardopereira committed Sep 27, 2019
1 parent 702c28e commit 3cbca52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Spec/Push.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ class Push : QuickSpec {
var rest: ARTRest!
var mockHttpExecutor: MockHTTPExecutor!
var storage: MockDeviceStorage!
var stateMachineDelegate: StateMachineDelegate!

beforeEach {
rest = ARTRest(key: "xxxx:xxxx")
rest.internal.resetDeviceSingleton()
mockHttpExecutor = MockHTTPExecutor()
rest.internal.httpExecutor = mockHttpExecutor
storage = MockDeviceStorage()
rest.internal.storage = storage
stateMachineDelegate = StateMachineDelegate()
rest.push.internal.activationMachine().delegate = stateMachineDelegate
}

// RSH2
Expand Down
2 changes: 1 addition & 1 deletion Spec/PushActivationStateMachine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ class StateMachineDelegate: NSObject, ARTPushRegistererDelegate {

typealias ARTDeviceId = String

class StateMachineDelegateCustomCallbacks: StateMachineDelegate {
private class StateMachineDelegateCustomCallbacks: StateMachineDelegate {

var onPushCustomRegister: ((ARTErrorInfo?, ARTDeviceDetails?) -> NSError?)?
var onPushCustomDeregister: ((ARTErrorInfo?, ARTDeviceId?) -> NSError?)?
Expand Down

0 comments on commit 3cbca52

Please sign in to comment.