Permalink
Browse files

Per-item calculator now only applies to products matching the promotion

Fixes #1526
  • Loading branch information...
Andrea Schiavini authored and radar committed May 11, 2012
1 parent 5758678 commit 67c39c0b528a70be842eff077d5542f2d1dacd28
Showing with 1 addition and 1 deletion.
  1. +1 −1 promo/spec/requests/promotion_adjustments_spec.rb
@@ -344,6 +344,7 @@
last_order.item_total.to_f.should == 60.00
last_order.adjustments.promotion.map(&:amount).sum.to_f.should == -40.00
last_order.total.to_f.should == 30.00
+ Spree::Order.last.total.to_f.should == 55.00 # mug(40) - mug_discount(5) + bag(20) - bag_discount(10) + shipping(10)
end
it "ceasing to be eligible for a promotion with item total rule then becoming eligible again" do
@@ -418,7 +419,6 @@
click_link "RoR Bag"
click_button "Add To Cart"
Spree::Order.last.total.to_f.should == 13.00
- #Spree::Order.last.adjustments.promotion.count.should == 2
fill_in "order[line_items_attributes][0][quantity]", :with => "2"
click_button "Update"

0 comments on commit 67c39c0

Please sign in to comment.