diff options
author | David Padilla <david@easybroker.com> | 2016-03-01 08:29:20 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-03-25 15:05:15 +0300 |
commit | 31e76baf610e1307090a6bac3a7b3d525bce057a (patch) | |
tree | 6381eb0aa46cdfb646f93aaa1bfd7b8e5d881333 /spec/mailers | |
parent | 63c8a05bf7f18ac4093ece1f08b4b5fd8dba5fac (diff) |
Fix #2364. Fall back to In-Reply-To header when reply key not available
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/notify_spec.rb | 6 | ||||
-rw-r--r-- | spec/mailers/shared/notify.rb | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 9b47acfe0cd..0f3de33f361 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -217,7 +217,11 @@ describe Notify do end it 'has the correct message-id set' do - is_expected.to have_header 'Message-ID', "<merge_request_#{merge_request.id}@#{Gitlab.config.gitlab.host}>" + is_expected.to have_header 'Message-ID', /<reply\+(.*)@#{Gitlab.config.gitlab.host}>/ + end + + it 'has the correct references set' do + is_expected.to have_header 'References', "<merge_request_#{merge_request.id}@#{Gitlab.config.gitlab.host}>" end context 'when enabled email_author_in_body' do diff --git a/spec/mailers/shared/notify.rb b/spec/mailers/shared/notify.rb index 6019af544d3..eafc5e5044b 100644 --- a/spec/mailers/shared/notify.rb +++ b/spec/mailers/shared/notify.rb @@ -50,7 +50,8 @@ shared_examples 'an email starting a new thread' do |message_id_prefix| include_examples 'an email with X-GitLab headers containing project details' it 'has a discussion identifier' do - is_expected.to have_header 'Message-ID', /<#{message_id_prefix}(.*)@#{Gitlab.config.gitlab.host}>/ + is_expected.to have_header 'Message-ID', /<reply\+(.*)@#{Gitlab.config.gitlab.host}>/ + is_expected.to have_header 'References', /<#{message_id_prefix}(.*)@#{Gitlab.config.gitlab.host}>/ end end |