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>2022-12-20 17:22:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 17:22:11 +0300
commit0c872e02b2c822e3397515ec324051ff540f0cd5 (patch)
treece2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/workers/mail_scheduler/notification_service_worker_spec.rb
parentf7e05a6853b12f02911494c4b3fe53d9540d74fc (diff)
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/workers/mail_scheduler/notification_service_worker_spec.rb')
-rw-r--r--spec/workers/mail_scheduler/notification_service_worker_spec.rb30
1 files changed, 7 insertions, 23 deletions
diff --git a/spec/workers/mail_scheduler/notification_service_worker_spec.rb b/spec/workers/mail_scheduler/notification_service_worker_spec.rb
index 3c17025c152..482d99a43c2 100644
--- a/spec/workers/mail_scheduler/notification_service_worker_spec.rb
+++ b/spec/workers/mail_scheduler/notification_service_worker_spec.rb
@@ -53,31 +53,15 @@ RSpec.describe MailScheduler::NotificationServiceWorker do
end
context 'when the method is not allowed' do
- context 'when verify_mail_scheduler_notification_service_worker_method_names is enabled' do
- it 'raises ArgumentError' do
- expect(worker.notification_service).not_to receive(:async)
- expect(worker.notification_service).not_to receive(:foo)
+ it 'raises ArgumentError' do
+ expect(worker.notification_service).not_to receive(:async)
+ expect(worker.notification_service).not_to receive(:foo)
- expect { worker.perform('async', *serialize(key)) }
- .to raise_error(ArgumentError, 'async not allowed for MailScheduler::NotificationServiceWorker')
+ expect { worker.perform('async', *serialize(key)) }
+ .to raise_error(ArgumentError, 'async not allowed for MailScheduler::NotificationServiceWorker')
- expect { worker.perform('foo', *serialize(key)) }
- .to raise_error(ArgumentError, 'foo not allowed for MailScheduler::NotificationServiceWorker')
- end
- end
-
- context 'when verify_mail_scheduler_notification_service_worker_method_names is disabled' do
- before do
- stub_feature_flags(verify_mail_scheduler_notification_service_worker_method_names: false)
- end
-
- it 'forwards the argument to the service' do
- expect(worker.notification_service).to receive(:async)
- expect(worker.notification_service).to receive(:foo)
-
- worker.perform('async', *serialize(key))
- worker.perform('foo', *serialize(key))
- end
+ expect { worker.perform('foo', *serialize(key)) }
+ .to raise_error(ArgumentError, 'foo not allowed for MailScheduler::NotificationServiceWorker')
end
end
end