summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-05-23 15:42:36 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-06-02 19:45:58 +0200
commit254830c1f963f344585a45d96a03985e1ec2df0e (patch)
tree2526feaa8293ca858cc9cb3c9f66a567eeb4b9f4 /spec/controllers
parent466beeb31f9ede870f1e6f4e85642a375663eaf2 (diff)
downloadgitlab-ce-254830c1f963f344585a45d96a03985e1ec2df0e.tar.gz
Move most of MetricsController logic to MetricsService
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