diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-23 17:28:45 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-23 17:54:45 +0200 |
commit | aa10b70f2a37c45bc2551f2a0d34a835dc7189f9 (patch) | |
tree | af08042b4c45c1bf1d76ddc2edd7193b64cf4bf0 /spec/gitlab_shell_spec.rb | |
parent | aa1a39a927b2810c07d23920d5035c6143d8c9cc (diff) | |
download | gitlab-shell-aa10b70f2a37c45bc2551f2a0d34a835dc7189f9.tar.gz |
Display the username instead of fullname
When running `ssh git@gitlab.example.com` we used to reply with the
full name. But it might actually be more useful to display the
username. This is unique and can help support identifying issues.
Closes #131
Diffstat (limited to 'spec/gitlab_shell_spec.rb')
-rw-r--r-- | spec/gitlab_shell_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb index c3d4466..0e8999b 100644 --- a/spec/gitlab_shell_spec.rb +++ b/spec/gitlab_shell_spec.rb @@ -167,7 +167,7 @@ describe GitlabShell do it "should use usernames if configured to do so" do GitlabConfig.any_instance.stub(audit_usernames: true) - $logger.should_receive(:info).with("executing git command", hash_including(user: 'John Doe')) + $logger.should_receive(:info).with("executing git command", hash_including(user: 'testuser')) end end @@ -202,7 +202,7 @@ describe GitlabShell do it "should use usernames if configured to do so" do GitlabConfig.any_instance.stub(audit_usernames: true) - $logger.should_receive(:info).with("executing git command", hash_including(user: 'John Doe')) + $logger.should_receive(:info).with("executing git command", hash_including(user: 'testuser')) end end @@ -248,7 +248,7 @@ describe GitlabShell do it "should use usernames if configured to do so" do GitlabConfig.any_instance.stub(audit_usernames: true) - $logger.should_receive(:info).with("executing git command", hash_including(user: 'John Doe')) + $logger.should_receive(:info).with("executing git command", hash_including(user: 'testuser')) end end @@ -275,7 +275,7 @@ describe GitlabShell do it "should use usernames if configured to do so" do GitlabConfig.any_instance.stub(audit_usernames: true) - $logger.should_receive(:info).with("executing git command", hash_including(user: 'John Doe')) + $logger.should_receive(:info).with("executing git command", hash_including(user: 'testuser')) end end @@ -452,7 +452,7 @@ describe GitlabShell do before do Kernel.stub(:exec) shell.gl_repository = gl_repository - shell.username = gl_username + shell.instance_variable_set(:@username, gl_username) end it "uses Kernel::exec method" do |