@@ -114,11 +114,11 class Mailer < ActionMailer::Base | |||
|
114 | 114 | added_to_url = '' |
|
115 | 115 | case container.class.name |
|
116 | 116 | when 'Project' |
|
117 |
added_to_url = url_for(:controller => ' |
|
|
117 | added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container) | |
|
118 | 118 | added_to = "#{l(:label_project)}: #{container}" |
|
119 | 119 | recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect {|u| u.mail} |
|
120 | 120 | when 'Version' |
|
121 |
added_to_url = url_for(:controller => ' |
|
|
121 | added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container.project) | |
|
122 | 122 | added_to = "#{l(:label_version)}: #{container.name}" |
|
123 | 123 | recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect {|u| u.mail} |
|
124 | 124 | when 'Document' |
@@ -26,6 +26,7 class MailerTest < ActiveSupport::TestCase | |||
|
26 | 26 | ActionMailer::Base.deliveries.clear |
|
27 | 27 | Setting.host_name = 'mydomain.foo' |
|
28 | 28 | Setting.protocol = 'http' |
|
29 | Setting.plain_text_mail = '0' | |
|
29 | 30 | end |
|
30 | 31 | |
|
31 | 32 | def test_generated_links_in_emails |
@@ -278,6 +279,9 class MailerTest < ActiveSupport::TestCase | |||
|
278 | 279 | assert Mailer.deliver_attachments_added(attachements) |
|
279 | 280 | assert_not_nil last_email.bcc |
|
280 | 281 | assert last_email.bcc.any? |
|
282 | assert_select_email do | |
|
283 | assert_select "a[href=?]", "http://mydomain.foo/projects/ecookbook/files" | |
|
284 | end | |
|
281 | 285 | end |
|
282 | 286 | |
|
283 | 287 | def test_project_file_added |
@@ -285,6 +289,9 class MailerTest < ActiveSupport::TestCase | |||
|
285 | 289 | assert Mailer.deliver_attachments_added(attachements) |
|
286 | 290 | assert_not_nil last_email.bcc |
|
287 | 291 | assert last_email.bcc.any? |
|
292 | assert_select_email do | |
|
293 | assert_select "a[href=?]", "http://mydomain.foo/projects/ecookbook/files" | |
|
294 | end | |
|
288 | 295 | end |
|
289 | 296 | |
|
290 | 297 | def test_news_added |
General Comments 0
You need to be logged in to leave comments.
Login now