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
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-12-12 17:17:02 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2017-12-12 17:17:02 +0300
commit51172fdf81a8ef4eda20de5a92d3c997a7b124c9 (patch)
treef663e5414a987f0831149b8be86b16cf83be3e9f /spec
parent52d9ee6299a55fc3362a47207e3d62fba1dfbdd1 (diff)
parent67fb91d4fd281c4ceee0bd17e67d5184576a7260 (diff)
Merge branch 'rc/backport-ee-fix' into 'master'
Backport a spec fix done in EE (5dbecb8e) to CE See merge request gitlab-org/gitlab-ce!15842
Diffstat (limited to 'spec')
-rw-r--r--spec/models/ci/build_spec.rb26
1 files changed, 8 insertions, 18 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index a6258676767..c5e23532aa5 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -132,11 +132,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? }
+ subject { build.artifacts? }
+ context 'when new artifacts are used' do
context 'artifacts archive does not exist' do
let(:build) { create(:ci_build) }
@@ -144,25 +142,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) }
@@ -170,17 +162,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