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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 00:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-04 00:09:00 +0300
commit71c9d577ad563572050335dc261ba7673e3e566f (patch)
treedcb4bb47b2d843de160feffe26dcefe20403f3fc /spec/models/ci
parent63a015fd85ae35634eb882d0078e65d80300816c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/build_spec.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 4f729f2546c..f0f6556deec 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -2338,14 +2338,24 @@ describe Ci::Build do
end
end
- describe '#has_expiring_artifacts?' do
+ describe '#has_expiring_archive_artifacts?' do
context 'when artifacts have expiration date set' do
before do
build.update(artifacts_expire_at: 1.day.from_now)
end
- it 'has expiring artifacts' do
- expect(build).to have_expiring_artifacts
+ context 'and job artifacts archive record exists' do
+ let!(:archive) { create(:ci_job_artifact, :archive, job: build) }
+
+ it 'has expiring artifacts' do
+ expect(build).to have_expiring_archive_artifacts
+ end
+ end
+
+ context 'and job artifacts archive record does not exist' do
+ it 'does not have expiring artifacts' do
+ expect(build).not_to have_expiring_archive_artifacts
+ end
end
end
@@ -2355,7 +2365,7 @@ describe Ci::Build do
end
it 'does not have expiring artifacts' do
- expect(build).not_to have_expiring_artifacts
+ expect(build).not_to have_expiring_archive_artifacts
end
end
end