diff options
Diffstat (limited to 'spec/controllers/application_controller_spec.rb')
-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 |