From 1e5fcec60ddab6e516ef10b45d670fab9325a782 Mon Sep 17 00:00:00 2001 From: Okhan Okbay Date: Thu, 30 May 2024 13:52:46 +0100 Subject: [PATCH] Comment out apple pay expired token test --- .../CheckoutAPIServiceIntegrationTests.swift | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/CheckoutTests/Integration/CheckoutAPIServiceIntegrationTests.swift b/CheckoutTests/Integration/CheckoutAPIServiceIntegrationTests.swift index f57c7095a..f03f3264d 100644 --- a/CheckoutTests/Integration/CheckoutAPIServiceIntegrationTests.swift +++ b/CheckoutTests/Integration/CheckoutAPIServiceIntegrationTests.swift @@ -61,38 +61,39 @@ final class CheckoutAPIServiceIntegrationTests: XCTestCase { } } - func test_createApplePayToken() { - let applePay = StubProvider.createApplePay() - - // details associated with default apple pay token - let expectedApplePayDetails = ApplePayDetails( - expiryDate: .init(month: 3, year: 2024), - bin: "537426", - last4: "7789" - ) - - let expectation = XCTestExpectation(description: "Waiting for token creation") - var tokenDetailsResult: Result? - - subject.createToken(.applePay(applePay)) { - tokenDetailsResult = $0 - expectation.fulfill() - } - - wait(for: [expectation], timeout: 35) - - guard let tokenDetailsResult = tokenDetailsResult else { - XCTFail("expected tokenDetailsResult") - return - } - - switch tokenDetailsResult { - case .success(let tokenDetails): - verifyApplePayToken(applePayDetails: expectedApplePayDetails, tokenDetails: tokenDetails) - case .failure(let tokenisationError): - XCTFail("expected success, received error, code: \(tokenisationError.code)") - } - } + #warning("Commented out until we get a new dummy Apple Pay token for stubbing purposes") +// func test_createApplePayToken() { +// let applePay = StubProvider.createApplePay() +// +// // details associated with default apple pay token +// let expectedApplePayDetails = ApplePayDetails( +// expiryDate: .init(month: 3, year: 2024), +// bin: "537426", +// last4: "7789" +// ) +// +// let expectation = XCTestExpectation(description: "Waiting for token creation") +// var tokenDetailsResult: Result? +// +// subject.createToken(.applePay(applePay)) { +// tokenDetailsResult = $0 +// expectation.fulfill() +// } +// +// wait(for: [expectation], timeout: 35) +// +// guard let tokenDetailsResult = tokenDetailsResult else { +// XCTFail("expected tokenDetailsResult") +// return +// } +// +// switch tokenDetailsResult { +// case .success(let tokenDetails): +// verifyApplePayToken(applePayDetails: expectedApplePayDetails, tokenDetails: tokenDetails) +// case .failure(let tokenisationError): +// XCTFail("expected success, received error, code: \(tokenisationError.code)") +// } +// } private func verifyCardToken( card: Card,