Created
September 1, 2017 09:05
-
-
Save olbrichj/7397edfd8124647673aac345659e7304 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import OHHTTPStubs | |
public func isURL(_ url: URL) -> OHHTTPStubsTestBlock { | |
return { $0.url == url } | |
} | |
extension OHHTTPStubs { | |
class func setupAuth() { | |
let response: [String: Any] = ["key": "value"] | |
stub(condition: isURL("auth.testxyz.com")) { _ in | |
return OHHTTPStubsResponse(responseObject: response, statusCode: 200, headers: nil) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment