diff options
author | Jason Hollingsworth <jhworth.developer@gmail.com> | 2014-02-08 21:08:49 -0600 |
---|---|---|
committer | Jason Hollingsworth <jhworth.developer@gmail.com> | 2014-02-13 22:59:39 -0600 |
commit | 29cfd33d949d21d67f3892473c24d4f0a127dfe6 (patch) | |
tree | e9ed4a10e06f7eba224150a643cb87507fc2ddc7 /spec/mailers | |
parent | d41e404e09c79394ff1938eee01b56345edc6ed9 (diff) | |
download | gitlab-ce-29cfd33d949d21d67f3892473c24d4f0a127dfe6.tar.gz |
Add email aliases for users
Emails are used to associate commits with users. The emails
are not verified and don't have to be valid email addresses. They
are assigned on a first come, first serve basis.
Notifications are sent when an email is added.
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/notify_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index d53dc17d977..88cae0bb756 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -90,6 +90,28 @@ describe Notify do end end + describe 'user added email' do + let(:email) { create(:email) } + + subject { Notify.new_email_email(email.id) } + + it 'is sent to the new user' do + should deliver_to email.user.email + end + + it 'has the correct subject' do + should have_subject /^gitlab \| Email was added to your account$/i + end + + it 'contains the new email address' do + should have_body_text /#{email.email}/ + end + + it 'includes a link to emails page' do + should have_body_text /#{profile_emails_path}/ + end + end + context 'for a project' do describe 'items that are assignable, the email' do let(:assignee) { create(:user, email: 'assignee@example.com') } |