diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-08-01 11:56:12 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-08-01 13:25:19 +0300 |
commit | c944e22d5087a87680737717ef2c6588320de64e (patch) | |
tree | a5732af55ac24554dcbac1ba208ddc5521450fef /spec/models/ci | |
parent | 8fe37da6cb648b73e618861b9672eb0cf34247d0 (diff) |
Fix spec failures
Diffstat (limited to 'spec/models/ci')
-rw-r--r-- | spec/models/ci/build_spec.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index aa856b0d5b8..af3afc2911c 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -2414,13 +2414,13 @@ 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! }.to have_valid_build_dependencies } + it { expect(job).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 have_valid_build_dependencies } + it { expect(job).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! }.not_to have_valid_build_dependencies } + it { expect(job).not_to have_valid_build_dependencies } end end @@ -2438,12 +2438,13 @@ 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! }.to have_valid_build_dependencies } + it { expect(job).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 have_valid_build_dependencies } + it { expect(job).to have_valid_build_dependencies } end context 'when artifacts of depended job has been erased' do @@ -2453,7 +2454,7 @@ describe Ci::Build do pre_stage_job.erase end - it { expect { job.run! }.to have_valid_build_dependencies } + it { expect(job).to have_valid_build_dependencies } end end @@ -2469,13 +2470,13 @@ describe Ci::Build do context 'when "dependencies" keyword is not defined' do let(:options) { {} } - it { expect { job.run! }.not_to raise_error } + it { expect(job).to have_valid_build_dependencies } end context 'when "dependencies" keyword is empty' do let(:options) { { dependencies: [] } } - it { expect { job.run! }.not_to raise_error } + it { expect(job).to have_valid_build_dependencies } end context 'when "dependencies" keyword is specified' do |