Skip to content

Commit

Permalink
Fix Lint Errors (#277)
Browse files Browse the repository at this point in the history
* fix linter for redundant_void_return
* disable rule non_optional_string_data_conversion
  • Loading branch information
jaxdesmarais authored Jun 6, 2024
1 parent b46f71d commit 93c59e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ disabled_rules:
- type_name # tests will have have the format <SUT>_Tests
- xctfail_message
- blanket_disable_command
- non_optional_string_data_conversion

opt_in_rules:
- array_init
Expand Down
14 changes: 7 additions & 7 deletions UnitTests/CardPaymentsTests/CardClient_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ class CardClient_Tests: XCTestCase {
expectation.fulfill()
},
cancel: { _ in XCTFail("Invoked cancel() callback. Should invoke success().") },
threeDSWillLaunch: { _ -> Void in XCTAssert(true) },
threeDSLaunched: { _ -> Void in XCTAssert(true) }
threeDSWillLaunch: { _ in XCTAssert(true) },
threeDSLaunched: { _ in XCTAssert(true) }
)

sut.vaultDelegate = mockCardVaultDelegate
Expand Down Expand Up @@ -291,7 +291,7 @@ class CardClient_Tests: XCTestCase {

let expectation = expectation(description: "approveOrder() completed")

let mockCardDelegate = MockCardDelegate(success: {_, result -> Void in
let mockCardDelegate = MockCardDelegate(success: {_, result in
XCTAssertEqual(result.orderID, "testOrderId")
XCTAssertEqual(result.status, "APPROVED")
XCTAssertFalse(result.didAttemptThreeDSecureAuthentication)
Expand All @@ -313,7 +313,7 @@ class CardClient_Tests: XCTestCase {

let expectation = expectation(description: "approveOrder() completed")

let mockCardDelegate = MockCardDelegate(success: {_, _ -> Void in
let mockCardDelegate = MockCardDelegate(success: {_, _ in
XCTFail("Invoked success() callback. Should invoke error().")
}, error: { _, error in
XCTAssertEqual(error.domain, "sdk-domain")
Expand All @@ -339,7 +339,7 @@ class CardClient_Tests: XCTestCase {

let expectation = expectation(description: "approveOrder() completed")

let mockCardDelegate = MockCardDelegate(success: {_, _ -> Void in
let mockCardDelegate = MockCardDelegate(success: {_, _ in
XCTFail("Invoked success() callback. Should invoke error().")
}, error: { _, error in
XCTAssertEqual(error.domain, CardClientError.domain)
Expand Down Expand Up @@ -375,8 +375,8 @@ class CardClient_Tests: XCTestCase {
expectation.fulfill()
},
cancel: { _ in XCTFail("Invoked cancel() callback. Should invoke success().") },
threeDSWillLaunch: { _ -> Void in XCTAssert(true) },
threeDSLaunched: { _ -> Void in XCTAssert(true) })
threeDSWillLaunch: { _ in XCTAssert(true) },
threeDSLaunched: { _ in XCTAssert(true) })

sut.delegate = mockCardDelegate
sut.approveOrder(request: cardRequest)
Expand Down

0 comments on commit 93c59e9

Please sign in to comment.