summaryrefslogtreecommitdiff
path: root/spec/models/ci/build_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-15 12:06:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-15 12:06:06 +0000
commitfc96671f817239041ba2747af835a8d5d9aa3739 (patch)
tree19c7f650c869033760850b0d0edd4fb0a10968c4 /spec/models/ci/build_spec.rb
parent3d13802bc2c9400ea33defdd43bff6d904ee9c4d (diff)
downloadgitlab-ce-fc96671f817239041ba2747af835a8d5d9aa3739.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/ci/build_spec.rb')
-rw-r--r--spec/models/ci/build_spec.rb18
1 files changed, 2 insertions, 16 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index bf09bf7f4b5..de90e4c2fba 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -957,7 +957,7 @@ describe Ci::Build do
end
describe 'state transition as a deployable' do
- let!(:build) { create(:ci_build, :start_review_app) }
+ let!(:build) { create(:ci_build, :with_deployment, :start_review_app) }
let(:deployment) { build.deployment }
let(:environment) { deployment.environment }
@@ -1043,20 +1043,6 @@ describe Ci::Build do
end
describe 'deployment' do
- describe '#has_deployment?' do
- subject { build.has_deployment? }
-
- context 'when build has a deployment' do
- let!(:deployment) { create(:deployment, deployable: build) }
-
- it { is_expected.to be_truthy }
- end
-
- context 'when build does not have a deployment' do
- it { is_expected.to be_falsy }
- end
- end
-
describe '#outdated_deployment?' do
subject { build.outdated_deployment? }
@@ -1955,7 +1941,7 @@ describe Ci::Build do
end
context 'when build has a start environment' do
- let(:build) { create(:ci_build, :deploy_to_production, pipeline: pipeline) }
+ let(:build) { create(:ci_build, :with_deployment, :deploy_to_production, pipeline: pipeline) }
it 'does not expand environment name' do
expect(build).not_to receive(:expanded_environment_name)