diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/services/notification_service_spec.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/services/notification_service_spec.rb')
-rw-r--r-- | spec/services/notification_service_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index 1ca14cd430b..1ad9234c939 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe NotificationService, :mailer do +RSpec.describe NotificationService, :mailer, feature_category: :team_planning do include EmailSpec::Matchers include ExternalAuthorizationServiceHelpers include NotificationHelpers @@ -337,11 +337,12 @@ RSpec.describe NotificationService, :mailer do describe '#access_token_expired' do let_it_be(:user) { create(:user) } + let_it_be(:pat) { create(:personal_access_token, user: user) } - subject { notification.access_token_expired(user) } + subject { notification.access_token_expired(user, pat.name) } it 'sends email to the token owner' do - expect { subject }.to have_enqueued_email(user, mail: "access_token_expired_email") + expect { subject }.to have_enqueued_email(user, pat.name, mail: "access_token_expired_email") end context 'when user is not allowed to receive notifications' do @@ -350,7 +351,7 @@ RSpec.describe NotificationService, :mailer do end it 'does not send email to the token owner' do - expect { subject }.not_to have_enqueued_email(user, mail: "access_token_expired_email") + expect { subject }.not_to have_enqueued_email(user, pat.name, mail: "access_token_expired_email") end end end |