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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-08-02 12:10:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-08-02 12:10:31 +0300
commita1131ca818b35bf982bb157d767c87ef3fc3819b (patch)
treefcf90023028f8908bc498c2fff6862d197c01553 /spec/workers
parent8bf623d6eaa873c2a77da3c14b51ce1eabdc84f7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/integrations/group_mention_worker_spec.rb18
1 files changed, 13 insertions, 5 deletions
diff --git a/spec/workers/integrations/group_mention_worker_spec.rb b/spec/workers/integrations/group_mention_worker_spec.rb
index 111e3f5a107..e79b654184d 100644
--- a/spec/workers/integrations/group_mention_worker_spec.rb
+++ b/spec/workers/integrations/group_mention_worker_spec.rb
@@ -37,12 +37,10 @@ RSpec.describe Integrations::GroupMentionWorker, :clean_gitlab_redis_shared_stat
context 'when mentionable_type is not supported' do
let(:args) do
- {
+ super().merge(
mentionable_type: 'Unsupported',
- mentionable_id: 23,
- hook_data: {},
- is_confidential: false
- }
+ mentionable_id: 23
+ )
end
it 'does not execute the service' do
@@ -61,5 +59,15 @@ RSpec.describe Integrations::GroupMentionWorker, :clean_gitlab_redis_shared_stat
worker.perform(args)
end
end
+
+ context 'when mentionable cannot be found' do
+ let(:args) { super().merge(mentionable_id: non_existing_record_id) }
+
+ it 'does not execute the service' do
+ expect(service_class).not_to receive(:new)
+
+ worker.perform(args)
+ end
+ end
end
end