summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-12-02 16:23:19 +0900
committerShinya Maeda <shinya@gitlab.com>2017-12-06 15:53:59 +0900
commit6171db2d2df337ef52460387a48f28136e809861 (patch)
tree8a364ba334efb8ab8d7df299b262ea427b1cd596 /spec
parent38d46754be49f13c1f92fd1f79ff49c76ec55c49 (diff)
downloadgitlab-ce-6171db2d2df337ef52460387a48f28136e809861.tar.gz
Fix /build_spec.rb
Diffstat (limited to 'spec')
-rw-r--r--spec/models/ci/build_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 6d33d0d917a..2cacf04a791 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -1869,6 +1869,10 @@ describe Ci::Build do
end
describe 'state transition: any => [:running]' do
+ before do
+ stub_feature_flags(ci_validates_dependencies: true)
+ end
+
let(:build) { create(:ci_build, :pending, pipeline: pipeline, stage_idx: 1, options: options) }
context 'when "dependencies" keyword is not defined' do
@@ -1887,13 +1891,14 @@ describe Ci::Build do
let(:options) { { dependencies: ['test'] } }
context 'when a depended job exists' do
- let!(:pre_stage_job) { create(:ci_build, pipeline: pipeline, name: 'test', stage_idx: 0) }
+ let!(:pre_stage_job) { create(:ci_build, :success, pipeline: pipeline, name: 'test', stage_idx: 0) }
it { expect { build.run! }.not_to raise_error }
context 'when "artifacts" keyword is specified on depended job' do
let!(:pre_stage_job) do
create(:ci_build,
+ :success,
:artifacts,
pipeline: pipeline,
name: 'test',