mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Undo dodgy redirect changes and set spec to pending
This commit is contained in:
@@ -37,7 +37,7 @@ Spree::Admin::BaseController.class_eval do
|
||||
redirect_to '/unauthorized'
|
||||
else
|
||||
store_location
|
||||
redirect_to root_path(anchor: "login?after_login=#{request.fullpath || request.env['PATH_INFO']}")
|
||||
redirect_to root_path(anchor: "login?after_login=#{ request.env['PATH_INFO'] }")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -161,12 +161,14 @@ module Admin
|
||||
end
|
||||
|
||||
it "redirects to login with the query params in case of session problems" do
|
||||
pending("Difficult to reproduce: sometimes get logged out of OFN during Stripe connect
|
||||
redirect/callback process. After logging in again, it doesn't redirect to the callback URL.")
|
||||
controller.stub spree_current_user: nil
|
||||
params = {this: "that"}
|
||||
spree_get :stripe_connect_callback, params
|
||||
# This is the correct redirect - but not sure it actually works since the redirect
|
||||
# This is the idea - but even if generated correctly not sure it actually works since the redirect
|
||||
# is ultimately handled in Angular, which presumably doesn't know which controller to
|
||||
# use for the action
|
||||
# use for the action?
|
||||
response.should redirect_to root_path(anchor: "login?after_login=/?action=stripe_connect&this=that")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user