diff options
author | James Newton <hello@jamesnewton.com> | 2015-10-28 18:39:23 +0300 |
---|---|---|
committer | James Newton <hello@jamesnewton.com> | 2015-10-29 13:00:17 +0300 |
commit | 3bb626f91cb50bd2eff58681e22db942b7d6a087 (patch) | |
tree | 643e740b70f97bd647c89ca46234c1d5e65f4f4e /spec/controllers | |
parent | 98cc695afb2fc97a1ca897ad28741612bcde88a3 (diff) |
refactor login as to be impersonation with better login/logout
Modifies the existing "login as" feature to be called impersonation, as
well as keeping track of who is impersonating to revert back to that
user without having to log out.
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/admin/users_controller_spec.rb | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index fcbe62cace8..8b7af4d3a0a 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -7,21 +7,6 @@ describe Admin::UsersController do sign_in(admin) end - describe 'POST login_as' do - let(:user) { create(:user) } - - it 'logs admin as another user' do - expect(warden.authenticate(scope: :user)).not_to eq(user) - post :login_as, id: user.username - expect(warden.authenticate(scope: :user)).to eq(user) - end - - it 'redirects user to homepage' do - post :login_as, id: user.username - expect(response).to redirect_to(root_path) - end - end - describe 'DELETE #user with projects' do let(:user) { create(:user) } let(:project) { create(:project, namespace: user.namespace) } |