Skip to content
Snippets Groups Projects
Commit 5151ebf4 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files
parent 39c1cabf
No related branches found
No related tags found
1 merge request!5142Add a download buttons for Build Artifacts
Loading
@@ -628,7 +628,7 @@ describe Ci::Build, models: true do
Loading
@@ -628,7 +628,7 @@ describe Ci::Build, models: true do
   
describe '#erasable?' do describe '#erasable?' do
subject { build.erasable? } subject { build.erasable? }
it { is_expected.to eq true } it { is_expected.to be_truthy }
end end
   
describe '#erased?' do describe '#erased?' do
Loading
@@ -636,7 +636,7 @@ describe Ci::Build, models: true do
Loading
@@ -636,7 +636,7 @@ describe Ci::Build, models: true do
subject { build.erased? } subject { build.erased? }
   
context 'build has not been erased' do context 'build has not been erased' do
it { is_expected.to be false } it { is_expected.to be_falsey }
end end
   
context 'build has been erased' do context 'build has been erased' do
Loading
@@ -644,12 +644,13 @@ describe Ci::Build, models: true do
Loading
@@ -644,12 +644,13 @@ describe Ci::Build, models: true do
build.erase build.erase
end end
   
it { is_expected.to be true } it { is_expected.to be_truthy }
end end
end end
   
context 'metadata and build trace are not available' do context 'metadata and build trace are not available' do
let!(:build) { create(:ci_build, :success, :artifacts) } let!(:build) { create(:ci_build, :success, :artifacts) }
before do before do
build.remove_artifacts_metadata! build.remove_artifacts_metadata!
end end
Loading
@@ -676,7 +677,7 @@ describe Ci::Build, models: true do
Loading
@@ -676,7 +677,7 @@ describe Ci::Build, models: true do
end end
   
it 'returns false' do it 'returns false' do
expect(build.retryable?).to be(false) expect(build).not_to be_retryable
end end
end end
   
Loading
@@ -686,7 +687,7 @@ describe Ci::Build, models: true do
Loading
@@ -686,7 +687,7 @@ describe Ci::Build, models: true do
end end
   
it 'returns true' do it 'returns true' do
expect(build.retryable?).to be(true) expect(build).to be_retryable
end end
end end
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment