Skip to content

Commit b1a42b6

Browse files
committed
Make the NativePusher instance in the tests use the mock session
1 parent 778c3e4 commit b1a42b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Tests/NativePusherTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class NativePusherTests: XCTestCase {
147147
let url = URL(string: "https://nativepushclient-cluster1.pusher.com/client_api/v1/clients")!
148148
let urlResponse = HTTPURLResponse(url: url, statusCode: 500, httpVersion: nil, headerFields: nil)
149149
MockSession.addMockResponse(for: url, httpMethod: "POST", data: jsonData, urlResponse: urlResponse, error: nil)
150+
pusher.nativePusher.URLSession = MockSession.shared
150151

151152
let registerFailEx = expectation(description: "the appropriate delegate should be called when registration fails")
152153
dummyDelegate.registerFailEx = registerFailEx

0 commit comments

Comments
 (0)