summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-14 09:04:10 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-14 09:04:10 +0000
commitaec9f211e534900f602e769dcdd6f69730849f92 (patch)
tree1dc20c8300782edb2fa7db1f646938d555950538 /spec/controllers
parentda8ca8b217d0c060ec509fd385842da29e4e4a86 (diff)
parent3bb626f91cb50bd2eff58681e22db942b7d6a087 (diff)
downloadgitlab-ce-aec9f211e534900f602e769dcdd6f69730849f92.tar.gz
Merge branch 'impersonate' into 'master'
refactor login as to be impersonation with better login/logout Modifies the existing "login as" feature to be called impersonation. This also adds: * Application keep track of who is impersonating the user so they can revert back to the original user without having to log out. * Stores the user profile via `HTTP_REFERER` so you get redirected back to the person you have impersonated once you stop. ## Screenshots: ![](http://sindacio.us/i/2015-10-28_17-52-41.png) ![](http://sindacio.us/i/2015-10-28_17-53-08.png) See merge request !1702
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/admin/users_controller_spec.rb15
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) }