Fix routes

This commit is contained in:
Luis Ramos
2021-05-14 00:08:07 +01:00
parent a949422ac9
commit b1896733ca
2 changed files with 3 additions and 7 deletions

View File

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

View File

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