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/models/projects/build_artifacts_size_refresh_spec.rb')
-rw-r--r--spec/models/projects/build_artifacts_size_refresh_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/projects/build_artifacts_size_refresh_spec.rb b/spec/models/projects/build_artifacts_size_refresh_spec.rb
index 052e654af76..21cd8e0b9d4 100644
--- a/spec/models/projects/build_artifacts_size_refresh_spec.rb
+++ b/spec/models/projects/build_artifacts_size_refresh_spec.rb
@@ -265,4 +265,16 @@ RSpec.describe Projects::BuildArtifactsSizeRefresh, type: :model do
it { is_expected.to eq(result) }
end
end
+
+ describe 'callbacks' do
+ context 'when destroyed' do
+ it 'enqueues a Namespaces::ScheduleAggregationWorker' do
+ refresh = create(:project_build_artifacts_size_refresh)
+
+ expect(Namespaces::ScheduleAggregationWorker).to receive(:perform_async).with(refresh.project.namespace_id)
+
+ refresh.destroy!
+ end
+ end
+ end
end