Skip to content

Commit 82a6637

Browse files
Merge pull request #162 from Iterable/tapash/mob-3237-fix-integration-tests
[MOB-3237] - Fix integration tests.
2 parents 393fd77 + e610979 commit 82a6637

File tree

3 files changed

+133
-114
lines changed

3 files changed

+133
-114
lines changed

integration-testing/ios/example/IterableAPISupport.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct IterableAPISupport {
5353
return SendRequestError.createErroredFuture(reason: "Could not create in-app consume request")
5454
}
5555

56-
return NetworkHelper.sendRequest(request, usingSession: urlSession)
56+
return RequestSender.sendRequest(request, usingSession: urlSession)
5757
}
5858

5959
private static let urlSession: URLSession = {
@@ -65,9 +65,9 @@ struct IterableAPISupport {
6565
private static func getInAppMessages(apiKey: String,
6666
email: String) -> Future<[IterableInAppMessage], SendRequestError> {
6767
var args: [String: String] = [
68-
JsonKey.email.jsonKey: email,
68+
JsonKey.email: email,
6969
JsonKey.InApp.count: maxMessages.description,
70-
JsonKey.platform.jsonKey: JsonValue.iOS.rawValue,
70+
JsonKey.platform: JsonValue.iOS,
7171
JsonKey.InApp.sdkVersion: IterableAPI.sdkVersion,
7272
]
7373

@@ -82,12 +82,12 @@ struct IterableAPISupport {
8282
return SendRequestError.createErroredFuture(reason: "could not create get in-app request")
8383
}
8484

85-
return NetworkHelper.sendRequest(request, usingSession: urlSession).map { inAppMessages(fromPayload: $0) }
85+
return RequestSender.sendRequest(request, usingSession: urlSession).map { inAppMessages(fromPayload: $0) }
8686
}
8787

8888
private static func createIterableHeaders(apiKey: String) -> [String: String] {
89-
let headers = [JsonKey.contentType.jsonKey: JsonValue.applicationJson.jsonStringValue,
90-
JsonKey.Header.sdkPlatform: JsonValue.iOS.jsonStringValue,
89+
let headers = [JsonKey.contentType: JsonValue.applicationJson,
90+
JsonKey.Header.sdkPlatform: JsonValue.iOS,
9191
JsonKey.Header.sdkVersion: IterableAPI.sdkVersion,
9292
JsonKey.Header.apiKey: apiKey]
9393

@@ -151,6 +151,6 @@ struct IterableAPISupport {
151151
return SendRequestError.createErroredFuture(reason: "Could not create in-app consume request")
152152
}
153153

154-
return NetworkHelper.sendRequest(request, usingSession: urlSession)
154+
return RequestSender.sendRequest(request, usingSession: urlSession)
155155
}
156156
}

integration-testing/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@react-navigation/native": "^5.4.0",
1717
"@react-navigation/stack": "^5.3.7",
1818
"react": "^17.0.2",
19-
"react-native": "^0.64.1",
19+
"react-native": "^0.63",
2020
"react-native-elements": "^1.2.7",
2121
"react-native-gesture-handler": "^1.6.1",
2222
"react-native-ionicons": "^5.0.0-rc",

0 commit comments

Comments
 (0)