diff options
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 } |