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:
Diffstat (limited to 'spec/services/ci/job_artifacts/destroy_batch_service_spec.rb')
-rw-r--r--spec/services/ci/job_artifacts/destroy_batch_service_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/services/ci/job_artifacts/destroy_batch_service_spec.rb b/spec/services/ci/job_artifacts/destroy_batch_service_spec.rb
index 05069054483..9ca39d4d32e 100644
--- a/spec/services/ci/job_artifacts/destroy_batch_service_spec.rb
+++ b/spec/services/ci/job_artifacts/destroy_batch_service_spec.rb
@@ -40,7 +40,14 @@ RSpec.describe Ci::JobArtifacts::DestroyBatchService do
expect { execute }.not_to change { artifact_with_file.file.exists? }
end
- it 'deletes the artifact records' do
+ it 'deletes the artifact records and logs them' do
+ expect(Gitlab::Ci::Artifacts::Logger)
+ .to receive(:log_deleted)
+ .with(
+ match_array([artifact_with_file, artifact_without_file]),
+ 'Ci::JobArtifacts::DestroyBatchService#execute'
+ )
+
expect { subject }.to change { Ci::JobArtifact.count }.by(-2)
end