Skip to content

Commit

Permalink
Make the NativePusher instance in the tests use the mock session
Browse files Browse the repository at this point in the history
  • Loading branch information
hamchapman committed Jan 23, 2017
1 parent 778c3e4 commit b1a42b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Tests/NativePusherTests.swift
Expand Up @@ -147,6 +147,7 @@ class NativePusherTests: XCTestCase {
let url = URL(string: "https://nativepushclient-cluster1.pusher.com/client_api/v1/clients")!
let urlResponse = HTTPURLResponse(url: url, statusCode: 500, httpVersion: nil, headerFields: nil)
MockSession.addMockResponse(for: url, httpMethod: "POST", data: jsonData, urlResponse: urlResponse, error: nil)
pusher.nativePusher.URLSession = MockSession.shared

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

0 comments on commit b1a42b6

Please sign in to comment.