Skip to content
Snippets Groups Projects
Commit 004ccee2 authored by Stan Hu's avatar Stan Hu
Browse files

Fix incorrect "stopped impersonation" log message

Closes #21015
parent 148b8487
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -7,7 +7,7 @@ class Admin::ImpersonationsController < Admin::ApplicationController
 
warden.set_user(impersonator, scope: :user)
 
Gitlab::AppLogger.info("User #{original_user.username} has stopped impersonating #{impersonator.username}")
Gitlab::AppLogger.info("User #{impersonator.username} has stopped impersonating #{original_user.username}")
 
session[:impersonator_id] = nil
 
Loading
Loading
Loading
Loading
@@ -49,8 +49,7 @@ describe Admin::ImpersonationsController do
expect(response).to have_http_status(404)
end
 
it "doesn't sign us in as the impersonator" do
delete :destroy
it "doesn't sign us in as the impersonator" do delete :destroy
 
expect(warden.user).to eq(user)
end
Loading
Loading
@@ -77,6 +76,8 @@ describe Admin::ImpersonationsController do
 
context "when the impersonator is not blocked" do
it "redirects to the impersonated user's page" do
expect(Gitlab::AppLogger).to receive(:info).with("User #{impersonator.username} has stopped impersonating #{user.username}").and_call_original
delete :destroy
 
expect(response).to redirect_to(admin_user_path(user))
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment