mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Fix routes
This commit is contained in:
@@ -101,7 +101,7 @@ module Spree
|
||||
@order.next_transition.run_callbacks if @order.cart?
|
||||
redirect_to main_app.checkout_state_path(@order.checkout_steps.first)
|
||||
elsif @order.complete?
|
||||
redirect_to order_path(@order)
|
||||
redirect_to main_app.order_path(@order)
|
||||
else
|
||||
redirect_to main_app.cart_path
|
||||
end
|
||||
@@ -157,7 +157,7 @@ module Spree
|
||||
else
|
||||
flash[:error] = I18n.t(:orders_could_not_cancel)
|
||||
end
|
||||
redirect_to request.referer || order_path(@order)
|
||||
redirect_to request.referer || main_app.order_path(@order)
|
||||
end
|
||||
|
||||
private
|
||||
@@ -197,7 +197,7 @@ module Spree
|
||||
|
||||
if items.empty?
|
||||
flash[:error] = I18n.t(:orders_cannot_remove_the_final_item)
|
||||
redirect_to order_path(order_to_update)
|
||||
redirect_to main_app.order_path(order_to_update)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -225,10 +225,6 @@ describe Spree::OrdersController, type: :controller do
|
||||
describe "the page" do
|
||||
render_views
|
||||
|
||||
it "provides the right registration path" do
|
||||
expect(subject.registration_path).to eq registration_path
|
||||
end
|
||||
|
||||
it "shows the right registration link" do
|
||||
# We fixed our view by hardcoding the link.
|
||||
spree_registration_path = '/signup'
|
||||
|
||||
Reference in New Issue
Block a user