diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-18 12:08:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-18 12:08:30 +0300 |
commit | 5ccb67600c63549774a28811d177dd673e6dd4d0 (patch) | |
tree | c8af595d48607c660564fd89d77b47c3384501af /spec/controllers | |
parent | 6a201406143969f12cb9e4687a79ce9316420152 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/application_controller_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index c5306fda0a5..1e28ef4ba93 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -559,6 +559,28 @@ RSpec.describe ApplicationController do expect(controller.last_payload[:target_duration_s]).to eq(0.25) end end + + it 'logs response length' do + sign_in user + + get :index + + expect(controller.last_payload[:response_bytes]).to eq('authenticated'.bytesize) + end + + context 'with log_response_length disabled' do + before do + stub_feature_flags(log_response_length: false) + end + + it 'logs response length' do + sign_in user + + get :index + + expect(controller.last_payload).not_to include(:response_bytes) + end + end end describe '#access_denied' do |