mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Fix occurrences of order.shipping_method= by replacing with order.shipments=
This commit is contained in:
@@ -2383,6 +2383,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
shipping_methods: "Shipping Methods"
|
||||
payment_methods: "Payment Methods"
|
||||
payment_method_fee: "Transaction fee"
|
||||
payment_processing_failed: "Payment could not be processed, please check the details you entered"
|
||||
inventory_settings: "Inventory Settings"
|
||||
tag_rules: "Tag Rules"
|
||||
shop_preferences: "Shop Preferences"
|
||||
|
||||
@@ -842,7 +842,8 @@ describe Spree::Order do
|
||||
|
||||
describe '#charge_shipping_and_payment_fees!' do
|
||||
let(:order) do
|
||||
build(:order, shipping_method: build(:shipping_method))
|
||||
shipment = build(:shipment_with, :shipping_method, shipping_method: build(:shipping_method))
|
||||
build(:order, shipments: [shipment] )
|
||||
end
|
||||
|
||||
context 'after transitioning to payment' do
|
||||
|
||||
@@ -7,12 +7,12 @@ describe "checking out an order that initially fails", type: :request do
|
||||
let!(:order_cycle) { create(:simple_order_cycle) }
|
||||
let!(:exchange) { create(:exchange, order_cycle: order_cycle, sender: order_cycle.coordinator, receiver: shop, incoming: false, pickup_time: "Monday") }
|
||||
let!(:address) { create(:address) }
|
||||
let!(:order) { create(:order, distributor: shop, order_cycle: order_cycle) }
|
||||
let!(:line_item) { create(:line_item, order: order, quantity: 3, price: 5.00) }
|
||||
let!(:payment_method) { create(:bogus_payment_method, distributor_ids: [shop.id], environment: Rails.env) }
|
||||
let!(:check_payment_method) { create(:payment_method, distributor_ids: [shop.id], environment: Rails.env) }
|
||||
let!(:shipping_method) { create(:shipping_method, distributor_ids: [shop.id]) }
|
||||
let!(:shipment) { create(:shipment, order: order, shipping_method: shipping_method) }
|
||||
let!(:shipment) { create(:shipment_with, :shipping_method, shipping_method: shipping_method) }
|
||||
let!(:order) { create(:order, shipments: [shipment], distributor: shop, order_cycle: order_cycle) }
|
||||
let(:params) do
|
||||
{ format: :json, order: {
|
||||
shipping_method_id: shipping_method.id,
|
||||
|
||||
@@ -26,7 +26,6 @@ describe "checking out an order with a paypal express payment method", type: :re
|
||||
|
||||
before do
|
||||
order.reload.update_totals
|
||||
order.shipping_method = shipping_method
|
||||
expect(order.next).to be true # => address
|
||||
expect(order.next).to be true # => delivery
|
||||
expect(order.next).to be true # => payment
|
||||
|
||||
Reference in New Issue
Block a user