diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/mailers/emails/profile_spec.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/mailers/emails/profile_spec.rb')
-rw-r--r-- | spec/mailers/emails/profile_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/mailers/emails/profile_spec.rb b/spec/mailers/emails/profile_spec.rb index cdc298d685e..1fd2a92866d 100644 --- a/spec/mailers/emails/profile_spec.rb +++ b/spec/mailers/emails/profile_spec.rb @@ -198,9 +198,10 @@ RSpec.describe Emails::Profile do describe 'user personal access token has expired' do let_it_be(:user) { create(:user) } + let_it_be(:pat) { create(:personal_access_token, user: user) } context 'when valid' do - subject { Notify.access_token_expired_email(user) } + subject { Notify.access_token_expired_email(user, [pat.name]) } it_behaves_like 'an email sent from GitLab' it_behaves_like 'it should not have Gmail Actions links' @@ -211,11 +212,12 @@ RSpec.describe Emails::Profile do end it 'has the correct subject' do - is_expected.to have_subject /Your personal access token has expired/ + is_expected.to have_subject /Your personal access tokens have expired/ end it 'mentions the access token has expired' do - is_expected.to have_body_text /One or more of your personal access tokens has expired/ + is_expected.to have_body_text /The following personal access tokens have expired:/ + is_expected.to have_body_text /#{pat.name}/ end it 'includes a link to personal access tokens page' do @@ -279,7 +281,7 @@ RSpec.describe Emails::Profile do end context 'when source is provided' do - subject { Notify.access_token_revoked_email(user, token.name, 'secret_detection') } + subject { Notify.access_token_revoked_email(user, token.name, :secret_detection) } it_behaves_like 'an email sent from GitLab' it_behaves_like 'it should not have Gmail Actions links' |