removed changes to routes.rb

This commit is contained in:
Kelly
2024-04-23 22:15:43 -04:00
parent c64519ae2f
commit 64a1fd9270
2 changed files with 3 additions and 10 deletions

View File

@@ -54,13 +54,6 @@ Openfoodnetwork::Application.routes.draw do
end
end
# used for payments_controller_spec.rb
resources :payments do
member do
get :redirect_to_authorize
end
end
resources :line_items, only: [:destroy] do
get :bought, on: :collection
end

View File

@@ -9,7 +9,7 @@ describe "/payments/redirect_to_authorize", type: :request do
describe "when user isn't logged in" do
it "redirects to the login page and set error flash msg" do
get redirect_to_authorize_payment_path(payment)
get authorize_payment_path(payment)
expect(response).to redirect_to(root_path(anchor: "/login", after_login: request.fullpath))
expect(flash[:error]).to eq I18n.t("spree.orders.edit.login_to_view_order")
end
@@ -24,14 +24,14 @@ describe "/payments/redirect_to_authorize", type: :request do
end
it "redirects to the CVV response URL" do
get redirect_to_authorize_payment_path(payment)
get authorize_payment_path(payment)
expect(response).to redirect_to('http://example.com')
end
end
context "doesn't have cvv response message" do
it "redirect to order URL" do
get redirect_to_authorize_payment_path(payment)
get authorize_payment_path(payment)
expect(response).to redirect_to(order_url(order))
end
end