mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-13 23:37:47 +00:00
Fix ship_address_same_as_billing checkbox value with string
This commit is contained in:
@@ -62,7 +62,7 @@ describe "CheckoutCtrl", ->
|
||||
console.log prefix
|
||||
field = scope.fieldsToBind[0]
|
||||
expect(storage.bind).toHaveBeenCalledWith(scope, "Checkout.order.#{field}", {storeName: "#{prefix}_#{field}"})
|
||||
expect(storage.bind).toHaveBeenCalledWith(scope, "Checkout.ship_address_same_as_billing", {storeName: "#{prefix}_sameasbilling", defaultValue: true})
|
||||
expect(storage.bind).toHaveBeenCalledWith(scope, "Checkout.ship_address_same_as_billing", {storeName: "#{prefix}_sameasbilling", defaultValue: 'YES'})
|
||||
|
||||
it "it can retrieve data from localstorage", ->
|
||||
prefix = "order_#{scope.order.id}#{CurrentUser.id or ""}#{CurrentHubMock.hub.id}"
|
||||
|
||||
@@ -126,9 +126,9 @@ describe 'Checkout service', ->
|
||||
expect(Checkout.preprocess().ship_address).toBe(undefined)
|
||||
|
||||
it "munges the order attributes to clone ship address from bill address", ->
|
||||
Checkout.ship_address_same_as_billing = false
|
||||
Checkout.ship_address_same_as_billing = 'NO'
|
||||
expect(Checkout.preprocess().ship_address_attributes).toEqual(orderData.ship_address)
|
||||
Checkout.ship_address_same_as_billing = true
|
||||
Checkout.ship_address_same_as_billing = 'YES'
|
||||
expect(Checkout.preprocess().ship_address_attributes).toEqual(orderData.bill_address)
|
||||
|
||||
it "creates attributes for card fields", ->
|
||||
|
||||
Reference in New Issue
Block a user