Commit a7bdf87f434a09afd7e96c2e7f99cc3fc5be9a07

Authored by Philip Blatter
1 parent 11bedfe3

Added some tests.

Showing 1 changed file with 20 additions and 0 deletions   Show diff stats
spec/mailers/notify_spec.rb
@@ -161,6 +161,10 @@ describe Notify do @@ -161,6 +161,10 @@ describe Notify do
161 it 'contains a link to the new issue' do 161 it 'contains a link to the new issue' do
162 should have_body_text /#{project_issue_path project, issue}/ 162 should have_body_text /#{project_issue_path project, issue}/
163 end 163 end
  164 +
  165 + it 'has the correct message-id set' do
  166 + should have_header 'Message-ID', "<issue_#{issue.id}@#{Gitlab.config.gitlab.host}>"
  167 + end
164 end 168 end
165 169
166 describe 'that are new with a description' do 170 describe 'that are new with a description' do
@@ -197,6 +201,10 @@ describe Notify do @@ -197,6 +201,10 @@ describe Notify do
197 it 'contains a link to the issue' do 201 it 'contains a link to the issue' do
198 should have_body_text /#{project_issue_path project, issue}/ 202 should have_body_text /#{project_issue_path project, issue}/
199 end 203 end
  204 +
  205 + it 'has the correct reference set' do
  206 + should have_header 'References', "<issue_#{issue.id}@#{Gitlab.config.gitlab.host}>"
  207 + end
200 end 208 end
201 209
202 describe 'status changed' do 210 describe 'status changed' do
@@ -224,6 +232,10 @@ describe Notify do @@ -224,6 +232,10 @@ describe Notify do
224 it 'contains a link to the issue' do 232 it 'contains a link to the issue' do
225 should have_body_text /#{project_issue_path project, issue}/ 233 should have_body_text /#{project_issue_path project, issue}/
226 end 234 end
  235 +
  236 + it 'has the correct reference set' do
  237 + should have_header 'References', "<issue_#{issue.id}@#{Gitlab.config.gitlab.host}>"
  238 + end
227 end 239 end
228 240
229 end 241 end
@@ -253,6 +265,10 @@ describe Notify do @@ -253,6 +265,10 @@ describe Notify do
253 it 'contains the target branch for the merge request' do 265 it 'contains the target branch for the merge request' do
254 should have_body_text /#{merge_request.target_branch}/ 266 should have_body_text /#{merge_request.target_branch}/
255 end 267 end
  268 +
  269 + it 'has the correct message-id set' do
  270 + should have_header 'Message-ID', "<merge_request_#{merge_request.id}@#{Gitlab.config.gitlab.host}>"
  271 + end
256 end 272 end
257 273
258 describe 'that are new with a description' do 274 describe 'that are new with a description' do
@@ -313,6 +329,10 @@ describe Notify do @@ -313,6 +329,10 @@ describe Notify do
313 it 'contains a link to the merge request' do 329 it 'contains a link to the merge request' do
314 should have_body_text /#{project_merge_request_path project, merge_request}/ 330 should have_body_text /#{project_merge_request_path project, merge_request}/
315 end 331 end
  332 +
  333 + it 'has the correct reference set' do
  334 + should have_header 'References', "<merge_request_#{merge_request.id}@#{Gitlab.config.gitlab.host}>"
  335 + end
316 end 336 end
317 end 337 end
318 end 338 end