Patching a couple more issues

This commit is contained in:
Will Marshall
2014-05-02 15:17:44 +10:00
parent b907616749
commit 23fa1c7b7b
3 changed files with 5 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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