diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-26 00:11:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-26 00:11:07 +0300 |
commit | 1c61faf876f0da721dde9dc52fb28ab0e7330c6d (patch) | |
tree | b2c5330325d7cc53098dbcf53de1186f5b54bfba /spec/mailers | |
parent | eccc2ec564f427460be5ffa6f9a6fb25f3f7fe6d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/emails/profile_spec.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/mailers/emails/profile_spec.rb b/spec/mailers/emails/profile_spec.rb index 4816e88a311..3b0dfaff2cb 100644 --- a/spec/mailers/emails/profile_spec.rb +++ b/spec/mailers/emails/profile_spec.rb @@ -124,6 +124,46 @@ RSpec.describe Emails::Profile, feature_category: :user_profile do end end + describe 'new application has been created' do + let_it_be(:user) { create(:user) } + + context 'when valid' do + subject { Notify.application_created_email(user) } + + it_behaves_like 'an email sent from GitLab' + it_behaves_like 'it should not have Gmail Actions links' + it_behaves_like 'a user cannot unsubscribe through footer link' + + it 'is sent to the user' do + is_expected.to deliver_to user.email + end + + it 'has the correct subject' do + is_expected.to have_subject /^A new application has been created$/i + end + end + end + + describe 'An application has been authorized' do + let_it_be(:user) { create(:user) } + + context 'when valid' do + subject { Notify.application_authorized_email(user) } + + it_behaves_like 'an email sent from GitLab' + it_behaves_like 'it should not have Gmail Actions links' + it_behaves_like 'a user cannot unsubscribe through footer link' + + it 'is sent to the user' do + is_expected.to deliver_to user.email + end + + it 'has the correct subject' do + is_expected.to have_subject /^An application has been authorized$/i + end + end + end + describe 'user personal access token has been created' do let_it_be(:user) { create(:user) } let_it_be(:token) { create(:personal_access_token, user: user) } |