Undo dodgy redirect changes and set spec to pending

This commit is contained in:
stveep
2016-11-12 12:07:00 +00:00
committed by Rob Harrington
parent 47df2dc20b
commit d374ab569d
2 changed files with 5 additions and 3 deletions

View File

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

View File

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