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:
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/metrics_controller_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/controllers/metrics_controller_spec.rb b/spec/controllers/metrics_controller_spec.rb
index c09c3a1f6b7..99ad7b7738b 100644
--- a/spec/controllers/metrics_controller_spec.rb
+++ b/spec/controllers/metrics_controller_spec.rb
@@ -50,7 +50,9 @@ describe MetricsController do
end
context 'prometheus metrics are disabled' do
- allow(Gitlab::Metrics).to receive(:prometheus_metrics_enabled?).and_return(false)
+ before do
+ allow(Gitlab::Metrics).to receive(:prometheus_metrics_enabled?).and_return(false)
+ end
it 'returns proper response' do
get :metrics
@@ -65,6 +67,5 @@ describe MetricsController do
expect(response.status).to eq(404)
end
end
-
end
end