Skip to content

Commit

Permalink
Deprecate set_shipments_cost
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Mar 21, 2017
1 parent 85407b6 commit e5fce46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/app/models/spree/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ def set_shipments_cost
shipments.each(&:update_amounts)
update!
end
deprecate set_shipments_cost: :update!, deprecator: Spree::Deprecation

def is_risky?
payments.risky.count > 0
Expand Down
4 changes: 3 additions & 1 deletion core/spec/models/spree/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@
expect(shipment).to receive :update_amounts
expect(order.updater).to receive :update

order.set_shipments_cost
Spree::Deprecation.silence do
order.set_shipments_cost
end
end
end

Expand Down

0 comments on commit e5fce46

Please sign in to comment.