summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-03 15:14:04 +0000
committerDouwe Maan <douwe@gitlab.com>2015-04-03 15:14:04 +0000
commit04a42ce3f1688dd262f72f654b62d840c7efac6e (patch)
tree162e0fb0f302beab2920d542f2e158eb495a5191 /spec
parentaaacef47fff4d7c359cb025caf879dff56a98932 (diff)
parent81a5a9713d69c738912d27cb10e74577aa4f4978 (diff)
downloadgitlab-ce-04a42ce3f1688dd262f72f654b62d840c7efac6e.tar.gz
Merge branch 'custom-email-reply-to' into 'master'
Add ability to configure Reply-To address ### What does this MR do? This MR adds configuration variable `email_reply_to` to make it possible to configure a custom Reply-To address other than the default `noreply@mydomain.com`. ### What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)? #1305 See merge request !455
Diffstat (limited to 'spec')
-rw-r--r--spec/mailers/notify_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index ba42f9e5c70..7c4235ab379 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -7,9 +7,12 @@ describe Notify do
let(:gitlab_sender_display_name) { Gitlab.config.gitlab.email_display_name }
let(:gitlab_sender) { Gitlab.config.gitlab.email_from }
+ let(:gitlab_sender_reply_to) { Gitlab.config.gitlab.email_reply_to }
let(:recipient) { create(:user, email: 'recipient@example.com') }
let(:project) { create(:project) }
+ around(:each) { ActionMailer::Base.deliveries.clear }
+
before(:each) do
email = recipient.emails.create(email: "notifications@example.com")
recipient.update_attribute(:notification_email, email.email)
@@ -27,6 +30,11 @@ describe Notify do
expect(sender.display_name).to eq(gitlab_sender_display_name)
expect(sender.address).to eq(gitlab_sender)
end
+
+ it 'has a Reply-To address' do
+ reply_to = subject.header[:reply_to].addresses
+ expect(reply_to).to eq([gitlab_sender_reply_to])
+ end
end
shared_examples 'an email starting a new thread' do |message_id_prefix|