From 210c76eddc23eeee7bf9346e967b343df033797f Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 2 Apr 2015 11:22:12 +1100 Subject: [PATCH] Checkout won't load without payment and shipping methods; move spec to context where it can test the checkout --- spec/features/admin/reports_spec.rb | 2 +- spec/features/consumer/shopping/checkout_spec.rb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/features/admin/reports_spec.rb b/spec/features/admin/reports_spec.rb index f16b736c00..1d58938e38 100644 --- a/spec/features/admin/reports_spec.rb +++ b/spec/features/admin/reports_spec.rb @@ -108,7 +108,7 @@ feature %q{ page.should have_content 'Payment State' end - describe "Sales tax report" do + describe "sales tax report" do let(:distributor1) { create(:distributor_enterprise, with_payment_and_shipping: true) } let(:distributor2) { create(:distributor_enterprise, with_payment_and_shipping: true) } let(:user1) { create_enterprise_user enterprises: [distributor1] } diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index 12eca09339..290335f09e 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -21,11 +21,6 @@ feature "As a consumer I want to check out my cart", js: true do add_product_to_cart end - it "shows the current distributor on checkout" do - visit checkout_path - page.should have_content distributor.name - end - describe "with shipping and payment methods" do let(:sm1) { create(:shipping_method, require_ship_address: true, name: "Frogs", description: "yellow", calculator: Spree::Calculator::FlatRate.new(preferred_amount: 0.00)) } let(:sm2) { create(:shipping_method, require_ship_address: false, name: "Donkeys", description: "blue", calculator: Spree::Calculator::FlatRate.new(preferred_amount: 4.56)) } @@ -50,6 +45,11 @@ feature "As a consumer I want to check out my cart", js: true do checkout_as_guest end + it "shows the current distributor" do + visit checkout_path + page.should have_content distributor.name + end + it "shows a breakdown of the order price" do toggle_shipping choose sm2.name