Skip to content

Commit db98d00

Browse files
AlistairNormanadammathysstewartjarednormanNoah-Silvera
committed
Test that changes to item totals are respected
Co-authored-by: Adam Mueller <[email protected]> Co-authored-by: Andrew Stewart <[email protected]> Co-authored-by: Jared Norman <[email protected]> Co-authored-by: Noah Silvera <[email protected]> Co-authored-by: benjamin wil <[email protected]> Co-Authored-By: Sofia Besenski <[email protected]> Co-Authored-By: Chris Todorov <[email protected]>
1 parent 3dce4db commit db98d00

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/spec/models/spree/order_updater_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ module Spree
2929
}.to change { order.item_total }.to 20
3030
end
3131

32+
it "respects changes to item totals" do
33+
updater.recalculate
34+
order.line_items.first.update(quantity: 2)
35+
36+
expect {
37+
updater.recalculate
38+
}.to change { order.item_total }.by 10
39+
end
40+
3241
it "update shipment total" do
3342
create(:shipment, order:, cost: 10)
3443
expect {

0 commit comments

Comments
 (0)