summaryrefslogtreecommitdiff
path: root/spec/workers/namespaces/update_root_statistics_worker_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/workers/namespaces/update_root_statistics_worker_spec.rb')
-rw-r--r--spec/workers/namespaces/update_root_statistics_worker_spec.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/workers/namespaces/update_root_statistics_worker_spec.rb b/spec/workers/namespaces/update_root_statistics_worker_spec.rb
index a525904b757..f2f633a39ca 100644
--- a/spec/workers/namespaces/update_root_statistics_worker_spec.rb
+++ b/spec/workers/namespaces/update_root_statistics_worker_spec.rb
@@ -9,11 +9,9 @@ RSpec.describe Namespaces::UpdateRootStatisticsWorker do
Projects::ProjectDeletedEvent.new(data: { project_id: 1, namespace_id: namespace_id })
end
- subject { consume_event(event) }
+ subject { consume_event(subscriber: described_class, event: event) }
- def consume_event(event)
- described_class.new.perform(event.class.name, event.data)
- end
+ it_behaves_like 'subscribes to event'
it 'enqueues ScheduleAggregationWorker' do
expect(Namespaces::ScheduleAggregationWorker).to receive(:perform_async).with(namespace_id)