Skip to content

Instantly share code, notes, and snippets.

@GeekOnCoffee
Created January 18, 2012 04:19
Show Gist options
  • Save GeekOnCoffee/1630941 to your computer and use it in GitHub Desktop.
Save GeekOnCoffee/1630941 to your computer and use it in GitHub Desktop.
Spec Failures
Failures:
1) Spree::Promotion#eligible? when a coupon code has already resulted in an adjustment on the order should be eligible
Failure/Error: promotion.should be_eligible(@order)
expected eligible?(#<Spree::Order id: 1, number: "R288281306", item_total: #<BigDecimal:106477ff0,'0.0',9(18)>, total: #<BigDecimal:106477d98,'0.0',9(18)>, state: "cart", adjustment_total: #<BigDecimal:1064aaab8,'0.0',9(18)>, credit_total: #<BigDecimal:1064aa838,'0.0',9(18)>, user_id: 1, created_at: "2012-01-18 04:17:51", updated_at: "2012-01-18 04:17:51", completed_at: nil, bill_address_id: 1, ship_address_id: nil, payment_total: #<BigDecimal:1064c68d0,'0.0',9(18)>, shipping_method_id: nil, shipment_state: nil, payment_state: nil, email: "abraham_bauch@mante.biz", special_instructions: nil>) to return true, got false
# ./spec/models/promotion_spec.rb:180:in `block (4 levels) in <top (required)>'
2) Promotion Adjustments coupon promotions only counting the most valuable promotion adjustment in an order
Failure/Error: Spree::Order.last.total.to_f.should == 15.00
expected: 15.0
got: 18.0 (using ==)
# ./spec/requests/promotion_adjustments_spec.rb:313:in `block (3 levels) in <top (required)>'
3) Promotion Adjustments coupon promotions provides a promotion for the first order for a new user with an order correctly applies the adjustment
Failure/Error: page.should have_content("Promotion (Sign up)")
expected there to be content "Promotion (Sign up)" in "Order Summary\nItem Total: $40.00\nOrder Total: $40.00"
# ./spec/requests/promotion_adjustments_spec.rb:367:in `block (6 levels) in <top (required)>'
# ./spec/requests/promotion_adjustments_spec.rb:366:in `block (5 levels) in <top (required)>'
4) Promotion Adjustments coupon promotions provides a promotion for the first order for a new user with an order correctly applies the adjustment if a user signs up as a real user
Failure/Error: page.should have_content("Promotion (Sign up)")
expected there to be content "Promotion (Sign up)" in "Order Summary\nItem Total: $40.00\nOrder Total: $40.00"
# ./spec/requests/promotion_adjustments_spec.rb:379:in `block (6 levels) in <top (required)>'
# ./spec/requests/promotion_adjustments_spec.rb:378:in `block (5 levels) in <top (required)>'
Finished in 59.38 seconds
76 examples, 4 failures, 8 pending
Failed examples:
rspec ./spec/models/promotion_spec.rb:179 # Spree::Promotion#eligible? when a coupon code has already resulted in an adjustment on the order should be eligible
rspec ./spec/requests/promotion_adjustments_spec.rb:285 # Promotion Adjustments coupon promotions only counting the most valuable promotion adjustment in an order
rspec ./spec/requests/promotion_adjustments_spec.rb:362 # Promotion Adjustments coupon promotions provides a promotion for the first order for a new user with an order correctly applies the adjustment
rspec ./spec/requests/promotion_adjustments_spec.rb:371 # Promotion Adjustments coupon promotions provides a promotion for the first order for a new user with an order correctly applies the adjustment if a user signs up as a real user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment