summaryrefslogtreecommitdiff
path: root/spec/mailers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-07 00:23:58 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-07 23:19:17 +0100
commit9dbd7e5aec921e43f3ea89c8e3357ca0174b0937 (patch)
treeda089409d276cb6b048c52cb91a4d74f829ffda1 /spec/mailers
parentbc57ff0ef023db3d07f1adfa6a309fb4a24ed203 (diff)
downloadgitlab-ce-9dbd7e5aec921e43f3ea89c8e3357ca0174b0937.tar.gz
Allow notification email to be set separately from primary email.
Closes #1932.
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/notify_spec.rb9
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