From 9dbd7e5aec921e43f3ea89c8e3357ca0174b0937 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Sat, 7 Feb 2015 00:23:58 +0100 Subject: Allow notification email to be set separately from primary email. Closes #1932. --- spec/mailers/notify_spec.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'spec') 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 -- cgit v1.2.1