Skip to content

Commit a793cb0

Browse files
committed
nit: swiftlint
1 parent 5f5655d commit a793cb0

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

iOS_SDK/OneSignalSDK/OneSignalInAppMessagesMocks/IAMTestHelpers.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public class IAMTestHelpers: NSObject {
5353

5454
return OS_OPERATOR_STRINGS[Int(type)]
5555
}
56-
56+
5757
@objc
58-
public static func testDefaultMessageJson() -> [String : Any] {
58+
public static func testDefaultMessageJson() -> [String: Any] {
5959
return [
6060
"id": String(format: "%@_%i", OS_TEST_MESSAGE_ID, UUID().uuidString),
6161
"variants": [
@@ -67,22 +67,22 @@ public class IAMTestHelpers: NSObject {
6767
"default": "should_never_be_used_by_any_test"
6868
]
6969
],
70-
"triggers": [],
70+
"triggers": []
7171
]
7272
}
7373

7474
@objc
7575
public static func testMessageJsonWithTrigger(property: String, triggerId: String, type: Int32, value: Any) -> [String: Any] {
7676
var testMessage = self.testDefaultMessageJson()
77-
77+
7878
testMessage["triggers"] = [
7979
[
8080
[
81-
"kind" : property,
82-
"property" : property,
83-
"operator" : OS_OPERATOR_TO_STRING(type),
84-
"value" : value,
85-
"id" : triggerId
81+
"kind": property,
82+
"property": property,
83+
"operator": OS_OPERATOR_TO_STRING(type),
84+
"value": value,
85+
"id": triggerId
8686
]
8787
]
8888
]
@@ -92,7 +92,7 @@ public class IAMTestHelpers: NSObject {
9292
@objc
9393
public static func testFetchMessagesResponse(messages: [[String: Any]]) -> [String: Any] {
9494
return [
95-
"in_app_messages" : messages
95+
"in_app_messages": messages
9696
]
9797
}
9898
}

iOS_SDK/OneSignalSDK/OneSignalInAppMessagesTests/IAMIntegrationTests.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,22 @@ final class IAMIntegrationTests: XCTestCase {
4747
}
4848

4949
override func tearDownWithError() throws { }
50-
50+
5151
/**
5252
Pausing IAMs will not evaluate messages.
5353
*/
5454
func testPausingIAMs_doesNotCreateMessageQueue() throws {
5555
/* Setup */
56-
56+
5757
let client = MockOneSignalClient()
5858
OneSignalCoreImpl.setSharedClient(client)
59-
59+
6060
// 1. App ID is set because there are guards against nil App ID
6161
OneSignalConfigManager.setAppId("test-app-id")
6262

6363
// 2. Set up mock responses for the anonymous user, as the user needs an OSID
6464
MockUserRequests.setDefaultCreateAnonUserResponses(with: client)
65-
65+
6666
// 3. Set up mock responses for fetching IAMs
6767
let message = IAMTestHelpers.testMessageJsonWithTrigger(property: "session_time", triggerId: "test_id1", type: 1, value: 10.0)
6868
let response = IAMTestHelpers.testFetchMessagesResponse(messages: [message])
@@ -72,20 +72,20 @@ final class IAMIntegrationTests: XCTestCase {
7272

7373
// 4. Unblock the Consistency Manager to allow fetching of IAMs
7474
ConsistencyManagerHelpers.setDefaultRywToken(id: anonUserOSID)
75-
75+
7676
// 5. Pausing should prevent messages from being evaluated and shown
7777
OneSignalInAppMessages.__paused(true)
78-
78+
7979
// 6. Start the user manager to generate a user instance
8080
OneSignalUserManagerImpl.sharedInstance.start()
8181
OneSignalCoreMocks.waitForBackgroundThreads(seconds: 0.5)
82-
82+
8383
// 7. Fetch IAMs
8484
OneSignalInAppMessages.getFromServer(testPushSubId)
8585
OneSignalCoreMocks.waitForBackgroundThreads(seconds: 0.5)
8686

8787
// Make sure no IAM is showing, and the queue has no IAMs
8888
XCTAssertFalse(MockMessagingController.isInAppMessageShowing())
89-
XCTAssertEqual(MockMessagingController.messageDisplayQueue().count, 0);
89+
XCTAssertEqual(MockMessagingController.messageDisplayQueue().count, 0)
9090
}
9191
}

0 commit comments

Comments
 (0)