summaryrefslogtreecommitdiff
path: root/spec/mailers
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-03-25 20:17:24 -0700
committerStan Hu <stanhu@gmail.com>2015-04-03 06:47:54 -0700
commit81a5a9713d69c738912d27cb10e74577aa4f4978 (patch)
tree4a2379fbf18354765504595bf5c783c623f1cce8 /spec/mailers
parent2a0d38c03fa20979a92597fdff18989c2b8e106b (diff)
downloadgitlab-ce-81a5a9713d69c738912d27cb10e74577aa4f4978.tar.gz
Add ability to configure Reply-To address in gitlab.yml
Closes #1305
Diffstat (limited to 'spec/mailers')
-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|