From 2288d50a7bb4afcec4cfbcaa4b5cffaabd1df437 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 9 Sep 2018 04:10:44 +0200 Subject: Add force_login option to OAuth authorize page (#8655) * Add force_login option to OAuth authorize page For when a user needs to sign into an app from multiple accounts on the same server * When logging out from modal header, redirect back after re-login --- spec/controllers/auth/sessions_controller_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/controllers/auth/sessions_controller_spec.rb') diff --git a/spec/controllers/auth/sessions_controller_spec.rb b/spec/controllers/auth/sessions_controller_spec.rb index 97719a606..b4f912717 100644 --- a/spec/controllers/auth/sessions_controller_spec.rb +++ b/spec/controllers/auth/sessions_controller_spec.rb @@ -30,6 +30,13 @@ RSpec.describe Auth::SessionsController, type: :controller do expect(response).to redirect_to(new_user_session_path) end + + it 'does not delete redirect location with continue=true' do + sign_in(user, scope: :user) + controller.store_location_for(:user, '/authorize') + delete :destroy, params: { continue: 'true' } + expect(controller.stored_location_for(:user)).to eq '/authorize' + end end context 'with a suspended user' do -- cgit