Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-18 12:08:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-18 12:08:30 +0300
commit5ccb67600c63549774a28811d177dd673e6dd4d0 (patch)
treec8af595d48607c660564fd89d77b47c3384501af /spec/controllers
parent6a201406143969f12cb9e4687a79ce9316420152 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/application_controller_spec.rb22
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