summaryrefslogtreecommitdiff
path: root/spec/mailers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-13 12:35:33 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-13 12:35:33 +0300
commit17858d49f6b189c922c7a69e94b5d8aa96fb48ad (patch)
tree7ccc268442c37600f6f484efbca3ae8b9c571cfd /spec/mailers
parent3ea4bf4891d4d9aed994371a3a033db0e7bccbfa (diff)
parenta7bdf87f434a09afd7e96c2e7f99cc3fc5be9a07 (diff)
downloadgitlab-ce-17858d49f6b189c922c7a69e94b5d8aa96fb48ad.tar.gz
Merge pull request #6109 from jamit/master
Added email threading for update emails on issues and merge requests
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/notify_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 3b075044955..547268d44f0 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -161,6 +161,10 @@ describe Notify do
it 'contains a link to the new issue' do
should have_body_text /#{project_issue_path project, issue}/
end
+
+ it 'has the correct message-id set' do
+ should have_header 'Message-ID', "<issue_#{issue.id}@#{Gitlab.config.gitlab.host}>"
+ end
end
describe 'that are new with a description' do
@@ -197,6 +201,10 @@ describe Notify do
it 'contains a link to the issue' do
should have_body_text /#{project_issue_path project, issue}/
end
+
+ it 'has the correct reference set' do
+ should have_header 'References', "<issue_#{issue.id}@#{Gitlab.config.gitlab.host}>"
+ end
end
describe 'status changed' do
@@ -224,6 +232,10 @@ describe Notify do
it 'contains a link to the issue' do
should have_body_text /#{project_issue_path project, issue}/
end
+
+ it 'has the correct reference set' do
+ should have_header 'References', "<issue_#{issue.id}@#{Gitlab.config.gitlab.host}>"
+ end
end
end
@@ -253,6 +265,10 @@ describe Notify do
it 'contains the target branch for the merge request' do
should have_body_text /#{merge_request.target_branch}/
end
+
+ it 'has the correct message-id set' do
+ should have_header 'Message-ID', "<merge_request_#{merge_request.id}@#{Gitlab.config.gitlab.host}>"
+ end
end
describe 'that are new with a description' do
@@ -313,6 +329,10 @@ describe Notify do
it 'contains a link to the merge request' do
should have_body_text /#{project_merge_request_path project, merge_request}/
end
+
+ it 'has the correct reference set' do
+ should have_header 'References', "<merge_request_#{merge_request.id}@#{Gitlab.config.gitlab.host}>"
+ end
end
end
end