diff options
Diffstat (limited to 'spec/lib/gitlab/lograge/custom_options_spec.rb')
-rw-r--r-- | spec/lib/gitlab/lograge/custom_options_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/lograge/custom_options_spec.rb b/spec/lib/gitlab/lograge/custom_options_spec.rb index 3460a8fb080..090b79c5d3c 100644 --- a/spec/lib/gitlab/lograge/custom_options_spec.rb +++ b/spec/lib/gitlab/lograge/custom_options_spec.rb @@ -60,6 +60,16 @@ RSpec.describe Gitlab::Lograge::CustomOptions do expect(subject[:response_bytes]).to eq(1234) end + context 'with log_response_length disabled' do + before do + stub_feature_flags(log_response_length: false) + end + + it 'does not add the response length' do + expect(subject).not_to include(:response_bytes) + end + end + it 'adds Cloudflare headers' do expect(subject[:cf_ray]).to eq(event.payload[:cf_ray]) expect(subject[:cf_request_id]).to eq(event.payload[:cf_request_id]) |