Skip to content

Commit eede113

Browse files
committed
nit: Fix a string description to simplify tests
* Fix the string description of OSRequestCreateUser to be uniform
1 parent 6eda3bf commit eede113

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

iOS_SDK/OneSignalSDK/OneSignalUser/Source/Requests/OSRequestCreateUser.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class OSRequestCreateUser: OneSignalRequest, OSUserRequest {
7070
self.identityModel = identityModel
7171
self.pushSubscriptionModel = pushSubscriptionModel
7272
self.originalPushToken = originalPushToken
73-
self.stringDescription = "<OSRequestCreateUser with externalId: \(identityModel.externalId ?? "nil")>"
73+
self.stringDescription = "<OSRequestCreateUser with external_id: \(identityModel.externalId ?? "nil")>"
7474
super.init()
7575

7676
var params: [String: Any] = [:]
@@ -95,7 +95,7 @@ class OSRequestCreateUser: OneSignalRequest, OSUserRequest {
9595

9696
init(aliasLabel: String, aliasId: String, identityModel: OSIdentityModel) {
9797
self.identityModel = identityModel
98-
self.stringDescription = "<OSRequestCreateUser with alias \(aliasLabel): \(aliasId)>"
98+
self.stringDescription = "<OSRequestCreateUser with \(aliasLabel): \(aliasId)>"
9999
super.init()
100100
self.parameters = [
101101
"identity": [aliasLabel: aliasId],
@@ -126,7 +126,7 @@ class OSRequestCreateUser: OneSignalRequest, OSUserRequest {
126126
self.identityModel = identityModel
127127
self.pushSubscriptionModel = coder.decodeObject(forKey: "pushSubscriptionModel") as? OSSubscriptionModel
128128
self.originalPushToken = coder.decodeObject(forKey: "originalPushToken") as? String
129-
self.stringDescription = "<OSRequestCreateUser with externalId: \(identityModel.externalId ?? "nil")>"
129+
self.stringDescription = "<OSRequestCreateUser with external_id: \(identityModel.externalId ?? "nil")>"
130130
super.init()
131131
self.parameters = parameters
132132
self.method = HTTPMethod(rawValue: rawMethod)

iOS_SDK/OneSignalSDK/OneSignalUserMocks/MockUserRequests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ extension MockUserRequests {
8080
let anonCreateResponse = testDefaultFullCreateUserResponse(onesignalId: anonUserOSID, externalId: nil, subscriptionId: testPushSubId)
8181

8282
client.setMockResponseForRequest(
83-
request: "<OSRequestCreateUser with externalId: nil>",
83+
request: "<OSRequestCreateUser with external_id: nil>",
8484
response: anonCreateResponse)
8585
}
8686

@@ -90,7 +90,7 @@ extension MockUserRequests {
9090
let userResponse = MockUserRequests.testIdentityPayload(onesignalId: osid, externalId: externalId)
9191

9292
client.setMockResponseForRequest(
93-
request: "<OSRequestCreateUser with externalId: \(externalId)>",
93+
request: "<OSRequestCreateUser with external_id: \(externalId)>",
9494
response: userResponse
9595
)
9696
client.setMockResponseForRequest(
@@ -114,7 +114,7 @@ extension MockUserRequests {
114114
// 2. Set the response for the subsequent Create User request
115115
let userResponse = MockUserRequests.testIdentityPayload(onesignalId: osid, externalId: externalId)
116116
client.setMockResponseForRequest(
117-
request: "<OSRequestCreateUser with externalId: \(externalId)>",
117+
request: "<OSRequestCreateUser with external_id: \(externalId)>",
118118
response: userResponse)
119119
// 3. Set the response for the subsequent Fetch User request
120120
client.setMockResponseForRequest(

0 commit comments

Comments
 (0)