diff --git a/app/controllers/checkout_controller.rb b/app/controllers/checkout_controller.rb index 95cee2fd39..43930818ca 100644 --- a/app/controllers/checkout_controller.rb +++ b/app/controllers/checkout_controller.rb @@ -120,7 +120,7 @@ class CheckoutController < Spree::CheckoutController # Overriding to customize the cancel url def order_opts_with_new_cancel_return_url(order, payment_method_id, stage) opts = order_opts_without_new_cancel_return_url(order, payment_method_id, stage) - opts[:cancel_return_url] = main_app.shop_checkout_url + opts[:cancel_return_url] = main_app.checkout_url opts end alias_method_chain :order_opts, :new_cancel_return_url diff --git a/spec/controllers/checkout_controller_spec.rb b/spec/controllers/checkout_controller_spec.rb index 1f3b1cb9fc..d8c6ee738c 100644 --- a/spec/controllers/checkout_controller_spec.rb +++ b/spec/controllers/checkout_controller_spec.rb @@ -125,7 +125,7 @@ describe CheckoutController do it "should override the cancel return url" do controller.stub(:params).and_return({payment_method_id: payment_method.id}) - controller.send(:order_opts, order, payment_method.id, 'payment')[:cancel_return_url].should == shop_checkout_url + controller.send(:order_opts, order, payment_method.id, 'payment')[:cancel_return_url].should == checkout_url end end end diff --git a/spec/features/consumer/home_spec.rb b/spec/features/consumer/home_spec.rb index 67599d97a0..ae60766f30 100644 --- a/spec/features/consumer/home_spec.rb +++ b/spec/features/consumer/home_spec.rb @@ -4,13 +4,12 @@ feature 'Home', js: true do include AuthenticationWorkflow include UIComponentHelper - let(:distributor) { create(:distributor_enterprise) } + let!(:distributor) { create(:distributor_enterprise) } let(:d1) { create(:distributor_enterprise) } let(:d2) { create(:distributor_enterprise) } - let(:order_cycle) { create(:order_cycle, distributors: [distributor], coordinator: create(:distributor_enterprise)) } + let!(:order_cycle) { create(:order_cycle, distributors: [distributor], coordinator: create(:distributor_enterprise)) } + before do - distributor - order_cycle visit "/" end