##// END OF EJS Templates
Makes the link in an issue update notification point to the change (#9690)....
Jean-Philippe Lang -
r7910:040cfa4ad5df
parent child
Show More
@@ -74,7 +74,7 class Mailer < ActionMailer::Base
74 subject s
74 subject s
75 body :issue => issue,
75 body :issue => issue,
76 :journal => journal,
76 :journal => journal,
77 :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)
77 :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue, :anchor => "change-#{journal.id}")
78
78
79 render_multipart('issue_edit', body)
79 render_multipart('issue_edit', body)
80 end
80 end
@@ -48,7 +48,7 class MailerTest < ActiveSupport::TestCase
48 assert_select_email do
48 assert_select_email do
49 # link to the main ticket
49 # link to the main ticket
50 assert_select "a[href=?]",
50 assert_select "a[href=?]",
51 "https://mydomain.foo/issues/1",
51 "https://mydomain.foo/issues/1#change-2",
52 :text => "Bug #1: Can't print recipes"
52 :text => "Bug #1: Can't print recipes"
53 # link to a referenced ticket
53 # link to a referenced ticket
54 assert_select "a[href=?][title=?]",
54 assert_select "a[href=?][title=?]",
@@ -78,7 +78,7 class MailerTest < ActiveSupport::TestCase
78 assert_select_email do
78 assert_select_email do
79 # link to the main ticket
79 # link to the main ticket
80 assert_select "a[href=?]",
80 assert_select "a[href=?]",
81 "http://mydomain.foo/rdm/issues/1",
81 "http://mydomain.foo/rdm/issues/1#change-2",
82 :text => "Bug #1: Can't print recipes"
82 :text => "Bug #1: Can't print recipes"
83 # link to a referenced ticket
83 # link to a referenced ticket
84 assert_select "a[href=?][title=?]",
84 assert_select "a[href=?][title=?]",
@@ -111,7 +111,7 class MailerTest < ActiveSupport::TestCase
111 assert_select_email do
111 assert_select_email do
112 # link to the main ticket
112 # link to the main ticket
113 assert_select "a[href=?]",
113 assert_select "a[href=?]",
114 "http://mydomain.foo/rdm/issues/1",
114 "http://mydomain.foo/rdm/issues/1#change-2",
115 :text => "Bug #1: Can't print recipes"
115 :text => "Bug #1: Can't print recipes"
116 # link to a referenced ticket
116 # link to a referenced ticket
117 assert_select "a[href=?][title=?]",
117 assert_select "a[href=?][title=?]",
@@ -213,6 +213,11 class MailerTest < ActiveSupport::TestCase
213 assert_not_nil mail
213 assert_not_nil mail
214 assert_equal Mailer.message_id_for(journal), mail.message_id
214 assert_equal Mailer.message_id_for(journal), mail.message_id
215 assert_equal Mailer.message_id_for(journal.issue), mail.references.first.to_s
215 assert_equal Mailer.message_id_for(journal.issue), mail.references.first.to_s
216 assert_select_email do
217 # link to the update
218 assert_select "a[href=?]",
219 "http://mydomain.foo/issues/#{journal.journalized_id}#change-#{journal.id}"
220 end
216 end
221 end
217
222
218 def test_message_posted_message_id
223 def test_message_posted_message_id
General Comments 0
You need to be logged in to leave comments. Login now