Skip to content

Commit 9ef5c3b

Browse files
Fix OHHTTPStubs with their latest upgrade.
1 parent b129eaa commit 9ef5c3b

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

Tests/swift-sdk-objc-tests/IterableAPIObjCTests.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#import <XCTest/XCTest.h>
88

99
#import <asl.h>
10-
#import <OHHTTPStubs.h>
11-
#import <OHHTTPStubs/NSURLRequest+HTTPBodyTesting.h>
1210

1311
#import "swift_sdk_objc_tests-Swift.h"
1412

Tests/swift-sdk-swift-tests/DeeplinkTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,21 +123,21 @@ class DeeplinkTests: XCTestCase {
123123
}
124124

125125
private func setupRedirectStubResponse(location: String, campaignId: Int, templateId: Int, messageId: String) {
126-
OHHTTPStubs.stubRequests(passingTest: { (request) -> Bool in
126+
HTTPStubs.stubRequests(passingTest: { (request) -> Bool in
127127
return true
128-
}) { (request) -> OHHTTPStubsResponse in
129-
return OHHTTPStubsResponse(data: try! JSONSerialization.data(withJSONObject: [:], options: []), statusCode: 301, headers: [
128+
}) { (request) -> HTTPStubsResponse in
129+
return HTTPStubsResponse(data: try! JSONSerialization.data(withJSONObject: [:], options: []), statusCode: 301, headers: [
130130
"Location" : location,
131131
"Set-Cookie" : self.createCookieValue(nameValuePairs: "iterableEmailCampaignId", campaignId, "iterableTemplateId", templateId, "iterableMessageId", messageId)
132132
])
133133
}
134134
}
135135

136136
private func setupStubResponse() {
137-
OHHTTPStubs.stubRequests(passingTest: { (request) -> Bool in
137+
HTTPStubs.stubRequests(passingTest: { (request) -> Bool in
138138
return true
139-
}) { (request) -> OHHTTPStubsResponse in
140-
return OHHTTPStubsResponse(data: try! JSONSerialization.data(withJSONObject: [:], options: []), statusCode: 200, headers: nil)
139+
}) { (request) -> HTTPStubsResponse in
140+
return HTTPStubsResponse(data: try! JSONSerialization.data(withJSONObject: [:], options: []), statusCode: 200, headers: nil)
141141
}
142142
}
143143

Tests/swift-sdk-swift-tests/IterableAPIResponseTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ class IterableAPIResponseTests: XCTestCase {
144144
func testNetworkTimeoutResponse() {
145145
let xpectation = expectation(description: "timeout network response")
146146

147-
OHHTTPStubs.stubRequests(passingTest: { (request) -> Bool in
147+
HTTPStubs.stubRequests(passingTest: { (request) -> Bool in
148148
return true
149-
}) { (request) -> OHHTTPStubsResponse in
150-
let response = OHHTTPStubsResponse(data: try! JSONSerialization.data(withJSONObject: [:], options: []), statusCode: 200, headers: nil)
149+
}) { (request) -> HTTPStubsResponse in
150+
let response = HTTPStubsResponse(data: try! JSONSerialization.data(withJSONObject: [:], options: []), statusCode: 200, headers: nil)
151151
response.requestTime = 0.0
152152
response.responseTime = 2.0
153153
return response

0 commit comments

Comments
 (0)