summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-06-16 20:48:34 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-06-16 20:48:34 +0200
commit6e4d5334211d73dd731cb8757b2ef10e8ea428b7 (patch)
treef48f5b8582bd9ff93b8e58182cd5018eda6a82f4 /spec/controllers
parentbe5f665557fc4f5b10d34f407545486746af54b8 (diff)
downloadgitlab-ce-6e4d5334211d73dd731cb8757b2ef10e8ea428b7.tar.gz
Move Prometheus service to project model
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/deployments_controller_spec.rb2
-rw-r--r--spec/controllers/projects/prometheus_controller_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/projects/deployments_controller_spec.rb b/spec/controllers/projects/deployments_controller_spec.rb
index c3b4f812db9..4a77d4d8289 100644
--- a/spec/controllers/projects/deployments_controller_spec.rb
+++ b/spec/controllers/projects/deployments_controller_spec.rb
@@ -132,7 +132,7 @@ describe Projects::DeploymentsController do
let(:prometheus_service) { double('prometheus_service') }
before do
- allow(deployment).to receive(:prometheus_service).and_return(prometheus_service)
+ allow(deployment.project).to receive(:prometheus_service).and_return(prometheus_service)
end
context 'when environment has no metrics' do
diff --git a/spec/controllers/projects/prometheus_controller_spec.rb b/spec/controllers/projects/prometheus_controller_spec.rb
index a994ac6409f..eddf7275975 100644
--- a/spec/controllers/projects/prometheus_controller_spec.rb
+++ b/spec/controllers/projects/prometheus_controller_spec.rb
@@ -8,7 +8,7 @@ describe Projects::PrometheusController do
before do
allow(controller).to receive(:project).and_return(project)
- allow(controller).to receive(:prometheus_service).and_return(prometheus_service)
+ allow(project).to receive(:prometheus_service).and_return(prometheus_service)
project.add_master(user)
sign_in(user)