mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Remove Order #refresh_shipment_rates method
This commit is contained in:
@@ -492,10 +492,6 @@ module Spree
|
||||
end
|
||||
end
|
||||
|
||||
def refresh_shipment_rates
|
||||
shipments.map(&:refresh_rates)
|
||||
end
|
||||
|
||||
# After changing line items of a completed order
|
||||
def update_shipping_fees!
|
||||
shipments.each do |shipment|
|
||||
|
||||
@@ -377,7 +377,7 @@ describe Admin::BulkLineItemsController, type: :controller do
|
||||
line_item1.product.update_columns(tax_category_id: tax_cat5.id)
|
||||
line_item2.product.update_columns(tax_category_id: tax_cat10.id)
|
||||
|
||||
order.refresh_shipment_rates
|
||||
order.shipments.map(&:refresh_rates)
|
||||
order.select_shipping_method(shipping_method.id)
|
||||
order.finalize!
|
||||
order.recreate_all_fees!
|
||||
|
||||
@@ -76,7 +76,7 @@ FactoryBot.define do
|
||||
|
||||
distributor { create(:distributor_enterprise) }
|
||||
|
||||
after(:create, &:refresh_shipment_rates)
|
||||
after(:create) { |order, _evaluator| order.shipments.map(&:refresh_rates) }
|
||||
|
||||
factory :order_ready_to_ship do
|
||||
payment_state { 'paid' }
|
||||
|
||||
@@ -120,7 +120,7 @@ describe "Order Management" do
|
||||
|
||||
before do
|
||||
order.shipment.shipping_method.calculator.update(preferred_amount: 5.0)
|
||||
order.refresh_shipment_rates
|
||||
order.shipments.map(&:refresh_rates)
|
||||
order.save
|
||||
order.reload
|
||||
|
||||
|
||||
Reference in New Issue
Block a user