diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-04 15:17:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-04 15:17:40 +0300 |
commit | 9486811b62db7f35906bae75f912aa89804e721b (patch) | |
tree | 92da5045f0554bf89a60a96eb4ac1ffa96bfa427 /spec/workers/projects | |
parent | aa7870a90b5925412a38dd6a27522f83517b917e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/projects')
-rw-r--r-- | spec/workers/projects/process_sync_events_worker_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/workers/projects/process_sync_events_worker_spec.rb b/spec/workers/projects/process_sync_events_worker_spec.rb index 600fbbc6b20..963e0ad1028 100644 --- a/spec/workers/projects/process_sync_events_worker_spec.rb +++ b/spec/workers/projects/process_sync_events_worker_spec.rb @@ -6,10 +6,12 @@ RSpec.describe Projects::ProcessSyncEventsWorker do let!(:group) { create(:group) } let!(:project) { create(:project) } + subject(:worker) { described_class.new } + include_examples 'an idempotent worker' describe '#perform' do - subject(:perform) { described_class.new.perform } + subject(:perform) { worker.perform } before do project.update!(namespace: group) @@ -24,5 +26,13 @@ RSpec.describe Projects::ProcessSyncEventsWorker do an_object_having_attributes(namespace_id: group.id) ) end + + it 'logs the service result', :aggregate_failures do + expect(worker).to receive(:log_extra_metadata_on_done).with(:estimated_total_events, 2) + expect(worker).to receive(:log_extra_metadata_on_done).with(:consumable_events, 2) + expect(worker).to receive(:log_extra_metadata_on_done).with(:processed_events, 2) + + perform + end end end |