summaryrefslogtreecommitdiff
path: root/spec/mailers/shared
diff options
context:
space:
mode:
authorFu Xu <fuxu@fuxu.name>2016-09-28 16:14:47 +0800
committerFu Xu <fuxu@fuxu.name>2016-10-03 18:07:28 +0800
commit048f124a0851a51c449881814dbfd2f2fc2dd32d (patch)
tree1feb362fbb4bea77d070b9d18376471b2f994b1b /spec/mailers/shared
parent2a438f452c920e57545add519ed7b7a2c15e660e (diff)
downloadgitlab-ce-048f124a0851a51c449881814dbfd2f2fc2dd32d.tar.gz
move spec back into shared example `an email sent from GitLab`
Diffstat (limited to 'spec/mailers/shared')
-rw-r--r--spec/mailers/shared/notify.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/mailers/shared/notify.rb b/spec/mailers/shared/notify.rb
index 5c9851f14c7..33d1075c739 100644
--- a/spec/mailers/shared/notify.rb
+++ b/spec/mailers/shared/notify.rb
@@ -37,6 +37,16 @@ shared_examples 'an email sent from GitLab' do
reply_to = subject.header[:reply_to].addresses
expect(reply_to).to eq([gitlab_sender_reply_to])
end
+
+ context 'when custom suffix for email subject is set' do
+ before do
+ stub_config_setting(email_subject_suffix: 'A Nice Suffix')
+ end
+
+ it 'ends the subject with the suffix' do
+ is_expected.to have_subject (/ \| A Nice Suffix$/)
+ end
+ end
end
shared_examples 'an email that contains a header with author username' do