From 5ccb67600c63549774a28811d177dd673e6dd4d0 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 18 Jul 2022 09:08:30 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/controllers/application_controller_spec.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'spec/controllers') 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 -- cgit v1.2.3