summaryrefslogtreecommitdiff
path: root/spec/models/deployment_spec.rb
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/models/deployment_spec.rb
parentbe5f665557fc4f5b10d34f407545486746af54b8 (diff)
downloadgitlab-ce-6e4d5334211d73dd731cb8757b2ef10e8ea428b7.tar.gz
Move Prometheus service to project model
Diffstat (limited to 'spec/models/deployment_spec.rb')
-rw-r--r--spec/models/deployment_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb
index eba0175c54c..bb84d3fc13d 100644
--- a/spec/models/deployment_spec.rb
+++ b/spec/models/deployment_spec.rb
@@ -30,7 +30,7 @@ describe Deployment, models: true do
end
describe '#includes_commit?' do
- let(:project) { create(:project, :repository) }
+ let(:project) { create(:project, :repository) }
let(:environment) { create(:environment, project: project) }
let(:deployment) do
create(:deployment, environment: environment, sha: project.commit.id)
@@ -91,7 +91,8 @@ describe Deployment, models: true do
end
describe '#additional_metrics' do
- let(:deployment) { create(:deployment) }
+ let(:project) { create(:project) }
+ let(:deployment) { create(:deployment, project: project) }
subject { deployment.additional_metrics }
@@ -111,7 +112,7 @@ describe Deployment, models: true do
let(:prometheus_service) { double('prometheus_service') }
before do
- allow(deployment).to receive(:prometheus_service).and_return(prometheus_service)
+ allow(project).to receive(:prometheus_service).and_return(prometheus_service)
allow(prometheus_service).to receive(:additional_deployment_metrics).and_return(simple_metrics)
end