Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-07-30 17:31:02 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-08-01 13:25:19 +0300
commit8ce03988b9a29d34016052be2dd8641fa7b9efbe (patch)
tree73567fbf41c8c1475d85adcd292066bc709a542e /spec/models
parentc0abcc68decea2eeb91cd7a15b605562b6c81c25 (diff)
Fix current spec failures
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/ci/build_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index e4fa04baae6..aa856b0d5b8 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -2409,18 +2409,18 @@ describe Ci::Build do
end
end
- describe 'state transition: any => [:running]' do
+ describe '#has_valid_build_dependencies?' do
shared_examples 'validation is active' do
context 'when depended job has not been completed yet' do
let!(:pre_stage_job) { create(:ci_build, :manual, pipeline: pipeline, name: 'test', stage_idx: 0) }
- it { expect { job.run! }.not_to raise_error }
+ it { expect { job.run! }.to have_valid_build_dependencies }
end
context 'when artifacts of depended job has been expired' do
let!(:pre_stage_job) { create(:ci_build, :success, :expired, pipeline: pipeline, name: 'test', stage_idx: 0) }
- it { expect { job.run! }.to raise_error(Ci::Build::MissingDependenciesError) }
+ it { expect { job.run! }.not_to have_valid_build_dependencies }
end
context 'when artifacts of depended job has been erased' do
@@ -2430,7 +2430,7 @@ describe Ci::Build do
pre_stage_job.erase
end
- it { expect { job.run! }.to raise_error(Ci::Build::MissingDependenciesError) }
+ it { expect { job.run! }.not_to have_valid_build_dependencies }
end
end
@@ -2438,12 +2438,12 @@ describe Ci::Build do
context 'when depended job has not been completed yet' do
let!(:pre_stage_job) { create(:ci_build, :manual, pipeline: pipeline, name: 'test', stage_idx: 0) }
- it { expect { job.run! }.not_to raise_error }
+ it { expect { job.run! }.to have_valid_build_dependencies }
end
context 'when artifacts of depended job has been expired' do
let!(:pre_stage_job) { create(:ci_build, :success, :expired, pipeline: pipeline, name: 'test', stage_idx: 0) }
- it { expect { job.run! }.not_to raise_error }
+ it { expect { job.run! }.to have_valid_build_dependencies }
end
context 'when artifacts of depended job has been erased' do
@@ -2453,7 +2453,7 @@ describe Ci::Build do
pre_stage_job.erase
end
- it { expect { job.run! }.not_to raise_error }
+ it { expect { job.run! }.to have_valid_build_dependencies }
end
end