diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/services/notification_service_spec.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/services/notification_service_spec.rb')
-rw-r--r-- | spec/services/notification_service_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index 7857bd2263f..1ca14cd430b 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -361,8 +361,14 @@ RSpec.describe NotificationService, :mailer do subject(:notification_service) { notification.access_token_revoked(user, pat.name) } - it 'sends email to the token owner' do - expect { notification_service }.to have_enqueued_email(user, pat.name, mail: "access_token_revoked_email") + it 'sends email to the token owner without source' do + expect { notification_service }.to have_enqueued_email(user, pat.name, nil, mail: "access_token_revoked_email") + end + + it 'sends email to the token owner with source' do + expect do + notification.access_token_revoked(user, pat.name, 'secret_detection') + end.to have_enqueued_email(user, pat.name, 'secret_detection', mail: "access_token_revoked_email") end context 'when user is not allowed to receive notifications' do |