diff options
author | Rémy Coutable <remy@rymai.me> | 2018-08-03 12:50:47 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-08-03 14:27:14 +0300 |
commit | c0c9e5dd6f2ff98240e6e4c3deba9cd2b1112b4d (patch) | |
tree | ae907b93ee85dc61e6f22f785ddb9a72b6f962c9 /spec/support | |
parent | 9db5245153aaf41cfd0186db60e1fb9f4e0d530f (diff) |
Ensure links in notifications footer are not escaped
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/notify_shared_examples.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/shared_examples/notify_shared_examples.rb b/spec/support/shared_examples/notify_shared_examples.rb index 5beae005cf7..5fb9ced3b63 100644 --- a/spec/support/shared_examples/notify_shared_examples.rb +++ b/spec/support/shared_examples/notify_shared_examples.rb @@ -87,6 +87,10 @@ shared_examples 'an email starting a new thread with reply-by-email enabled' do include_examples 'an email with X-GitLab headers containing project details' include_examples 'a new thread email with reply-by-email enabled' + it 'includes "Reply to this email directly or <View it on GitLab>"' do + expect(subject.default_part.body).to include(%(Reply to this email directly or <a href="#{Gitlab::UrlBuilder.build(model)}">view it on GitLab</a>.)) + end + context 'when reply-by-email is enabled with incoming address with %{key}' do it 'has a Reply-To header' do is_expected.to have_header 'Reply-To', /<reply+(.*)@#{Gitlab.config.gitlab.host}>\Z/ |