Commit 5dbecb8e authored by Rémy Coutable's avatar Rémy Coutable

Fix a wrong conflict resolution in spec/models/ci/build_spec.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 477e570b
......@@ -133,11 +133,9 @@ describe Ci::Build do
end
describe '#artifacts?' do
context 'when new artifacts are used' do
let(:build) { create(:ci_build, :artifacts) }
subject { build.artifacts? }
context 'when new artifacts are used' do
context 'artifacts archive does not exist' do
let(:build) { create(:ci_build) }
......@@ -145,39 +143,19 @@ describe Ci::Build do
end
context 'artifacts archive exists' do
let(:build) { create(:ci_build, :artifacts) }
it { is_expected.to be_truthy }
context 'is expired' do
let!(:build) { create(:ci_build, :artifacts, :expired) }
let(:build) { create(:ci_build, :artifacts, :expired) }
it { is_expected.to be_falsy }
end
context 'is not expired' do
it { is_expected.to be_truthy }
end
end
end
context 'when legacy artifacts are used' do
let(:build) { create(:ci_build, :legacy_artifacts) }
subject { build.artifacts? }
context 'artifacts archive does not exist' do
let(:build) { create(:ci_build) }
context 'is not expired' do
it { is_expected.to be_truthy }
end
end
end
context 'when legacy artifacts are used' do
let(:build) { create(:ci_build, :legacy_artifacts) }
subject { build.artifacts? }
context 'artifacts archive does not exist' do
let(:build) { create(:ci_build) }
......@@ -185,17 +163,15 @@ describe Ci::Build do
end
context 'artifacts archive exists' do
let(:build) { create(:ci_build, :legacy_artifacts) }
it { is_expected.to be_truthy }
context 'is expired' do
let!(:build) { create(:ci_build, :legacy_artifacts, :expired) }
let(:build) { create(:ci_build, :legacy_artifacts, :expired) }
it { is_expected.to be_falsy }
end
context 'is not expired' do
it { is_expected.to be_truthy }
end
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment