##// END OF EJS Templates
add mail footer test (#13482)...
Toshi MARUYAMA -
r11490:9fea2ab6d224
parent child
Show More
@@ -596,6 +596,26 class MailerTest < ActiveSupport::TestCase
596 end
596 end
597 end
597 end
598
598
599 def test_layout_should_include_the_emails_footer
600 with_settings :emails_footer => "*Footer content*" do
601 with_settings :plain_text_mail => 0 do
602 assert Mailer.test_email(User.find(1)).deliver
603 assert_select_email do
604 assert_select ".footer" do
605 assert_select "strong", :text => "Footer content"
606 end
607 end
608 end
609 with_settings :plain_text_mail => 1 do
610 assert Mailer.test_email(User.find(1)).deliver
611 mail = last_email
612 assert_not_nil mail
613 assert_include "\n-- \n", mail.body.decoded
614 assert_include "*Footer content*", mail.body.decoded
615 end
616 end
617 end
618
599 def test_should_escape_html_templates_only
619 def test_should_escape_html_templates_only
600 Issue.generate!(:project_id => 1, :tracker_id => 1, :subject => 'Subject with a <tag>')
620 Issue.generate!(:project_id => 1, :tracker_id => 1, :subject => 'Subject with a <tag>')
601 mail = last_email
621 mail = last_email
General Comments 0
You need to be logged in to leave comments. Login now