From 673c0dca365015e8a0c948952caf1773d16e8d2a Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Tue, 20 Aug 2013 14:25:35 +1000 Subject: [PATCH] Fix varying shipping amounts --- spec/features/consumer/checkout_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/features/consumer/checkout_spec.rb b/spec/features/consumer/checkout_spec.rb index 1fbb895a80..882b1f0977 100644 --- a/spec/features/consumer/checkout_spec.rb +++ b/spec/features/consumer/checkout_spec.rb @@ -63,7 +63,8 @@ feature %q{ @zone = create(:zone) c = Spree::Country.find_by_name('Australia') Spree::ZoneMember.create(:zoneable => c, :zone => @zone) - create(:shipping_method, zone: @zone) + sm = create(:shipping_method, zone: @zone, calculator: Spree::Calculator::FlatRate.new) + sm.calculator.set_preference(:amount, 0); sm.calculator.save! @payment_method_all = create(:payment_method, :name => 'Cheque payment method', :description => 'Cheque payment method') #valid for any distributor @payment_method_distributor = create(:payment_method, :name => 'Edible Garden payment method', :distributor => @distributor)