summaryrefslogtreecommitdiff
path: root/spec/mailers
diff options
context:
space:
mode:
authorFu Xu <fuxu@fuxu.name>2016-09-02 16:57:08 +0800
committerFu Xu <fuxu@fuxu.name>2016-10-03 18:07:28 +0800
commit74c8e091f40c29a59b99bf7864b9fee303c68e50 (patch)
tree48d65f3bad5d39656840526ef1720ee1e93335de /spec/mailers
parent7134599860651cc0f502581c97853a26f2fb4471 (diff)
downloadgitlab-ce-74c8e091f40c29a59b99bf7864b9fee303c68e50.tar.gz
add configurable email subject suffix
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/shared/notify.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/mailers/shared/notify.rb b/spec/mailers/shared/notify.rb
index 5c9851f14c7..de1d8995534 100644
--- a/spec/mailers/shared/notify.rb
+++ b/spec/mailers/shared/notify.rb
@@ -2,6 +2,7 @@ shared_context 'gitlab email notification' 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(:gitlab_subject_suffix) { Gitlab.config.gitlab.email_subject_suffix }
let(:recipient) { create(:user, email: 'recipient@example.com') }
let(:project) { create(:project) }
let(:new_user_address) { 'newguy@example.com' }
@@ -31,6 +32,9 @@ shared_examples 'an email sent from GitLab' do
sender = subject.header[:from].addrs[0]
expect(sender.display_name).to eq(gitlab_sender_display_name)
expect(sender.address).to eq(gitlab_sender)
+ if gitlab_subject_suffix.length > 0
+ is_expected.to have_subject gitlab_subject_suffix
+ end
end
it 'has a Reply-To address' do