diff options
Diffstat (limited to 'spec/controllers/repositories/git_http_controller_spec.rb')
-rw-r--r-- | spec/controllers/repositories/git_http_controller_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/controllers/repositories/git_http_controller_spec.rb b/spec/controllers/repositories/git_http_controller_spec.rb index aafb933df32..c938df8cf4e 100644 --- a/spec/controllers/repositories/git_http_controller_spec.rb +++ b/spec/controllers/repositories/git_http_controller_spec.rb @@ -60,10 +60,21 @@ RSpec.describe Repositories::GitHttpController do get :info_refs, params: params end + + include_context 'parsed logs' do + it 'adds user info to the logs' do + get :info_refs, params: params + + expect(log_data).to include('username' => user.username, + 'user_id' => user.id, + 'meta.user' => user.username) + end + end end context 'with exceptions' do before do + allow(controller).to receive(:authenticate_user).and_return(true) allow(controller).to receive(:verify_workhorse_api!).and_return(true) end |