diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/services/notification_service_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/services/notification_service_spec.rb')
-rw-r--r-- | spec/services/notification_service_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index 8fbf023cda0..7857bd2263f 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -211,6 +211,23 @@ RSpec.describe NotificationService, :mailer do it_behaves_like 'participating by assignee notification' end + describe '.permitted_actions' do + it 'includes public methods' do + expect(described_class.permitted_actions).to include(:access_token_created) + end + + it 'excludes EXCLUDED_ACTIONS' do + described_class::EXCLUDED_ACTIONS.each do |action| + expect(described_class.permitted_actions).not_to include(action) + end + end + + it 'excludes protected and private methods' do + expect(described_class.permitted_actions).not_to include(:new_resource_email) + expect(described_class.permitted_actions).not_to include(:approve_mr_email) + end + end + describe '#async' do let(:async) { notification.async } |