mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
removed changes to routes.rb
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user