Skip to content

Commit

Permalink
Add test for ApplePayUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewc committed Nov 8, 2023
1 parent 88a4cec commit 21b7fad
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Debug App/Tests/Unit Tests/Utils/ApplePayUtilsTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ import XCTest
final class ApplePayUtilsTest: XCTestCase {

func testApplePaySupportedPaymentNetworks() {
// w/ CB
XCTAssertEqual(ApplePayUtils.supportedPKPaymentNetworks(cardNetworks: [.cartesBancaires]), [.cartesBancaires])

// w/ mixed
XCTAssertEqual(ApplePayUtils.supportedPKPaymentNetworks(cardNetworks: [.visa, .masterCard, .amex, .cartesBancaires]), [.visa, .masterCard, .amex, .cartesBancaires])

// w/ none
XCTAssertEqual(ApplePayUtils.supportedPKPaymentNetworks(cardNetworks: []), [])
}

func testApplePaySupportedPaymentNetworksViaPrimerSettings() {

// w/ CB
PrimerSettings.current.paymentMethodOptions.cardPaymentOptions = .init(supportedCardNetworks: [.cartesBancaires])
Expand Down

0 comments on commit 21b7fad

Please sign in to comment.