Makes the link in an issue update notification point to the change (#9690).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8030 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
77fc113273
commit
040cfa4ad5
|
@ -74,7 +74,7 @@ class Mailer < ActionMailer::Base
|
||||||
subject s
|
subject s
|
||||||
body :issue => issue,
|
body :issue => issue,
|
||||||
:journal => journal,
|
:journal => journal,
|
||||||
:issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)
|
:issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue, :anchor => "change-#{journal.id}")
|
||||||
|
|
||||||
render_multipart('issue_edit', body)
|
render_multipart('issue_edit', body)
|
||||||
end
|
end
|
||||||
|
|
|
@ -48,7 +48,7 @@ class MailerTest < ActiveSupport::TestCase
|
||||||
assert_select_email do
|
assert_select_email do
|
||||||
# link to the main ticket
|
# link to the main ticket
|
||||||
assert_select "a[href=?]",
|
assert_select "a[href=?]",
|
||||||
"https://mydomain.foo/issues/1",
|
"https://mydomain.foo/issues/1#change-2",
|
||||||
:text => "Bug #1: Can't print recipes"
|
:text => "Bug #1: Can't print recipes"
|
||||||
# link to a referenced ticket
|
# link to a referenced ticket
|
||||||
assert_select "a[href=?][title=?]",
|
assert_select "a[href=?][title=?]",
|
||||||
|
@ -78,7 +78,7 @@ class MailerTest < ActiveSupport::TestCase
|
||||||
assert_select_email do
|
assert_select_email do
|
||||||
# link to the main ticket
|
# link to the main ticket
|
||||||
assert_select "a[href=?]",
|
assert_select "a[href=?]",
|
||||||
"http://mydomain.foo/rdm/issues/1",
|
"http://mydomain.foo/rdm/issues/1#change-2",
|
||||||
:text => "Bug #1: Can't print recipes"
|
:text => "Bug #1: Can't print recipes"
|
||||||
# link to a referenced ticket
|
# link to a referenced ticket
|
||||||
assert_select "a[href=?][title=?]",
|
assert_select "a[href=?][title=?]",
|
||||||
|
@ -111,7 +111,7 @@ class MailerTest < ActiveSupport::TestCase
|
||||||
assert_select_email do
|
assert_select_email do
|
||||||
# link to the main ticket
|
# link to the main ticket
|
||||||
assert_select "a[href=?]",
|
assert_select "a[href=?]",
|
||||||
"http://mydomain.foo/rdm/issues/1",
|
"http://mydomain.foo/rdm/issues/1#change-2",
|
||||||
:text => "Bug #1: Can't print recipes"
|
:text => "Bug #1: Can't print recipes"
|
||||||
# link to a referenced ticket
|
# link to a referenced ticket
|
||||||
assert_select "a[href=?][title=?]",
|
assert_select "a[href=?][title=?]",
|
||||||
|
@ -213,6 +213,11 @@ class MailerTest < ActiveSupport::TestCase
|
||||||
assert_not_nil mail
|
assert_not_nil mail
|
||||||
assert_equal Mailer.message_id_for(journal), mail.message_id
|
assert_equal Mailer.message_id_for(journal), mail.message_id
|
||||||
assert_equal Mailer.message_id_for(journal.issue), mail.references.first.to_s
|
assert_equal Mailer.message_id_for(journal.issue), mail.references.first.to_s
|
||||||
|
assert_select_email do
|
||||||
|
# link to the update
|
||||||
|
assert_select "a[href=?]",
|
||||||
|
"http://mydomain.foo/issues/#{journal.journalized_id}#change-#{journal.id}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_message_posted_message_id
|
def test_message_posted_message_id
|
||||||
|
|
Loading…
Reference in New Issue