diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-13 00:09:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-13 00:09:19 +0300 |
commit | 458209640c39594084bda2b57d77a08bce6efc36 (patch) | |
tree | 9fcb3e77cce65baca1d3af3ab350072621d84716 /spec/mailers/devise_mailer_spec.rb | |
parent | f4182abcb628e20978f011376811bbf8e644eff5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers/devise_mailer_spec.rb')
-rw-r--r-- | spec/mailers/devise_mailer_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/mailers/devise_mailer_spec.rb b/spec/mailers/devise_mailer_spec.rb index 2ee15308400..c9dfee8255d 100644 --- a/spec/mailers/devise_mailer_spec.rb +++ b/spec/mailers/devise_mailer_spec.rb @@ -64,4 +64,34 @@ RSpec.describe DeviseMailer do is_expected.to have_body_text /#{Gitlab.config.gitlab.url}/ end end + + describe '#user_admin_approval' do + subject { described_class.user_admin_approval(user) } + + let_it_be(:user) { create(: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 'Welcome to GitLab!' + end + + it 'greets the user' do + is_expected.to have_body_text /Hi #{user.name}!/ + end + + it 'includes the correct content' do + is_expected.to have_body_text /Your GitLab account request has been approved!/ + end + + it 'includes a link to GitLab' do + is_expected.to have_link(Gitlab.config.gitlab.url) + end + end end |