about summary refs log tree commit diff
path: root/spec/controllers/auth/sessions_controller_spec.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-09-09 04:10:44 +0200
committerGitHub <noreply@github.com>2018-09-09 04:10:44 +0200
commit2288d50a7bb4afcec4cfbcaa4b5cffaabd1df437 (patch)
tree7280431cffebdd35edcf99b53e92321b8a693dad /spec/controllers/auth/sessions_controller_spec.rb
parent2492c12281e4fc692fc4f0fe9dc0abb0455b50d8 (diff)
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
Diffstat (limited to 'spec/controllers/auth/sessions_controller_spec.rb')
-rw-r--r--spec/controllers/auth/sessions_controller_spec.rb7
1 files changed, 7 insertions, 0 deletions
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