mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Patching a couple more issues
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user