diff options
Diffstat (limited to 'spec/lib/gitlab/grape_logging/loggers/response_logger_spec.rb')
-rw-r--r-- | spec/lib/gitlab/grape_logging/loggers/response_logger_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/grape_logging/loggers/response_logger_spec.rb b/spec/lib/gitlab/grape_logging/loggers/response_logger_spec.rb index 1bf97e87708..449096a6faf 100644 --- a/spec/lib/gitlab/grape_logging/loggers/response_logger_spec.rb +++ b/spec/lib/gitlab/grape_logging/loggers/response_logger_spec.rb @@ -20,6 +20,14 @@ RSpec.describe Gitlab::GrapeLogging::Loggers::ResponseLogger do it { expect(subject).to eq({ response_bytes: response1.bytesize + response2.bytesize }) } end + context 'with log_response_length disabled' do + before do + stub_feature_flags(log_response_length: false) + end + + it { expect(subject).to eq({}) } + end + context 'when response is a String' do let(:response) { response1 } |