mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-24 05:38:52 +00:00
Add code to CheckoutController to construct card attributes when using an existing card (via a818fbbecd/core/app/models/spree/order/checkout.rb:212)
This commit is contained in:
@@ -204,8 +204,6 @@ describe 'Checkout service', ->
|
||||
|
||||
it "passes the card ID in source attributes if a saved card is selected", ->
|
||||
Checkout.secrets.selected_card = 1
|
||||
source_attributes = Checkout.preprocess().payments_attributes[0].source_attributes
|
||||
source_attributes = Checkout.preprocess()
|
||||
expect(source_attributes).toBeDefined()
|
||||
expect(source_attributes.credit_card_id).toBe 1
|
||||
expect(source_attributes.type).toBe "Spree::CreditCard"
|
||||
expect(source_attributes.year).toBeUndefined()
|
||||
expect(source_attributes.existing_card).toBe 1
|
||||
|
||||
Reference in New Issue
Block a user