From 9dc93a4519d9d5d7be48ff274127136236a3adb3 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 20 Apr 2021 23:50:22 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-11-stable-ee --- spec/models/ci/job_artifact_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'spec/models/ci/job_artifact_spec.rb') diff --git a/spec/models/ci/job_artifact_spec.rb b/spec/models/ci/job_artifact_spec.rb index 796947be4c8..cdb123573f1 100644 --- a/spec/models/ci/job_artifact_spec.rb +++ b/spec/models/ci/job_artifact_spec.rb @@ -195,6 +195,22 @@ RSpec.describe Ci::JobArtifact do end end + describe '#archived_trace_exists?' do + subject { artifact.archived_trace_exists? } + + context 'when the file exists' do + it { is_expected.to be_truthy } + end + + context 'when the file does not exist' do + before do + artifact.file.remove! + end + + it { is_expected.to be_falsy } + end + end + describe '.for_sha' do let(:first_pipeline) { create(:ci_pipeline) } let(:second_pipeline) { create(:ci_pipeline, project: first_pipeline.project, sha: Digest::SHA1.hexdigest(SecureRandom.hex)) } -- cgit v1.2.1