Skip to content

Commit

Permalink
Order#recalculate already updates shipment amounts
Browse files Browse the repository at this point in the history
It does it in the OrderUpdater#update_shipment_amounts.
  • Loading branch information
elia committed May 10, 2019
1 parent 1d1327e commit 0a04e8e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion core/app/models/spree/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,6 @@ def shipping_eq_billing_address?

# @deprecated This now happens during #recalculate
def set_shipments_cost
shipments.each(&:update_amounts)
recalculate
end
deprecate set_shipments_cost: :recalculate, deprecator: Spree::Deprecation
Expand Down
1 change: 0 additions & 1 deletion core/spec/models/spree/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
before { allow(order).to receive_messages shipments: [shipment] }

it "update and persist totals" do
expect(shipment).to receive :update_amounts
expect(order.updater).to receive :update

Spree::Deprecation.silence do
Expand Down

0 comments on commit 0a04e8e

Please sign in to comment.