summaryrefslogtreecommitdiff
path: root/spec/services/ci/job_artifacts/delete_project_artifacts_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/ci/job_artifacts/delete_project_artifacts_service_spec.rb')
-rw-r--r--spec/services/ci/job_artifacts/delete_project_artifacts_service_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/services/ci/job_artifacts/delete_project_artifacts_service_spec.rb b/spec/services/ci/job_artifacts/delete_project_artifacts_service_spec.rb
new file mode 100644
index 00000000000..74fa42962f3
--- /dev/null
+++ b/spec/services/ci/job_artifacts/delete_project_artifacts_service_spec.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Ci::JobArtifacts::DeleteProjectArtifactsService do
+ let_it_be(:project) { create(:project) }
+
+ subject { described_class.new(project: project) }
+
+ describe '#execute' do
+ it 'enqueues a Ci::ExpireProjectBuildArtifactsWorker' do
+ expect(Ci::JobArtifacts::ExpireProjectBuildArtifactsWorker).to receive(:perform_async).with(project.id).and_call_original
+
+ subject.execute
+ end
+ end
+end