diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-07 02:23:58 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-08 01:19:17 +0300 |
commit | 9dbd7e5aec921e43f3ea89c8e3357ca0174b0937 (patch) | |
tree | da089409d276cb6b048c52cb91a4d74f829ffda1 /spec | |
parent | bc57ff0ef023db3d07f1adfa6a309fb4a24ed203 (diff) |
Allow notification email to be set separately from primary email.
Closes #1932.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/mailers/notify_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index a0c37587b23..5af622f946e 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -9,9 +9,14 @@ describe Notify do let(:recipient) { create(:user, email: 'recipient@example.com') } let(:project) { create(:project) } + before(:each) do + email = recipient.emails.create(email: "notifications@example.com") + recipient.update_attribute(:notification_email, email.email) + end + shared_examples 'a multiple recipients email' do it 'is sent to the given recipient' do - should deliver_to recipient.email + should deliver_to recipient.notification_email end end @@ -441,7 +446,7 @@ describe Notify do end it 'is sent to the given recipient' do - should deliver_to recipient.email + should deliver_to recipient.notification_email end it 'contains the message from the note' do |