Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-stripe committed Dec 24, 2024
1 parent 991a2e4 commit a2fce78
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Stripe/StripeiOSTests/CustomerAdapterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Foundation
import OHHTTPStubs
import OHHTTPStubsSwift
@_spi(STP) @testable import StripeCore
@_spi(STP) @testable import StripeCore
@testable import StripeCoreTestUtils
@_spi(STP) @testable import StripePayments
@_spi(STP) @_spi(CustomerSessionBetaAccess) @testable import StripePaymentSheet
Expand Down Expand Up @@ -160,10 +159,10 @@ class CustomerAdapterTests: APIStubbedTestCase {
}

func testFetchPM_CardAndUSBankAccount() async throws {
let expectedPaymentMethods_card = [STPFixtures.paymentMethod()]
let expectedPaymentMethods_card = STPFixtures.paymentMethod()
let expectedPaymentMethods_cardJSON = [STPFixtures.paymentMethodJSON()]

let expectedPaymentMethods_usbank = [STPFixtures.bankAccountPaymentMethod()]
let expectedPaymentMethods_usbank = STPFixtures.bankAccountPaymentMethod()
let expectedPaymentMethods_usbankJSON = [STPFixtures.bankAccountPaymentMethodJSON()]

let apiClient = stubbedAPIClient()
Expand All @@ -177,8 +176,8 @@ class CustomerAdapterTests: APIStubbedTestCase {
apiClient: apiClient)
let pms = try await sut.fetchPaymentMethods()
XCTAssertEqual(pms.count, 2)
XCTAssertEqual(pms[0].stripeId, expectedPaymentMethods_card[0].stripeId)
XCTAssertEqual(pms[1].stripeId, expectedPaymentMethods_usbank[0].stripeId)
XCTAssertEqual(pms[0].stripeId, expectedPaymentMethods_usbank.stripeId)
XCTAssertEqual(pms[1].stripeId, expectedPaymentMethods_card.stripeId)
}

func testAttachPM() async throws {
Expand Down

0 comments on commit a2fce78

Please sign in to comment.