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 161 it 'contains a link to the new issue' do
162 162 should have_body_text /#{project_issue_path project, issue}/
163 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 168 end
165 169  
166 170 describe 'that are new with a description' do
... ... @@ -197,6 +201,10 @@ describe Notify do
197 201 it 'contains a link to the issue' do
198 202 should have_body_text /#{project_issue_path project, issue}/
199 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 208 end
201 209  
202 210 describe 'status changed' do
... ... @@ -224,6 +232,10 @@ describe Notify do
224 232 it 'contains a link to the issue' do
225 233 should have_body_text /#{project_issue_path project, issue}/
226 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 239 end
228 240  
229 241 end
... ... @@ -253,6 +265,10 @@ describe Notify do
253 265 it 'contains the target branch for the merge request' do
254 266 should have_body_text /#{merge_request.target_branch}/
255 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 272 end
257 273  
258 274 describe 'that are new with a description' do
... ... @@ -313,6 +329,10 @@ describe Notify do
313 329 it 'contains a link to the merge request' do
314 330 should have_body_text /#{project_merge_request_path project, merge_request}/
315 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 336 end
317 337 end
318 338 end
... ...