@@ -579,6 +579,7 class MailerTest < ActiveSupport::TestCase | |||||
579 |
|
579 | |||
580 | def test_layout_should_include_the_emails_header |
|
580 | def test_layout_should_include_the_emails_header | |
581 | with_settings :emails_header => "*Header content*" do |
|
581 | with_settings :emails_header => "*Header content*" do | |
|
582 | with_settings :plain_text_mail => 0 do | |||
582 | assert Mailer.test_email(User.find(1)).deliver |
|
583 | assert Mailer.test_email(User.find(1)).deliver | |
583 | assert_select_email do |
|
584 | assert_select_email do | |
584 | assert_select ".header" do |
|
585 | assert_select ".header" do | |
@@ -586,6 +587,13 class MailerTest < ActiveSupport::TestCase | |||||
586 | end |
|
587 | end | |
587 | end |
|
588 | end | |
588 | end |
|
589 | end | |
|
590 | with_settings :plain_text_mail => 1 do | |||
|
591 | assert Mailer.test_email(User.find(1)).deliver | |||
|
592 | mail = last_email | |||
|
593 | assert_not_nil mail | |||
|
594 | assert_include "*Header content*", mail.body.decoded | |||
|
595 | end | |||
|
596 | end | |||
589 | end |
|
597 | end | |
590 |
|
598 | |||
591 | def test_should_escape_html_templates_only |
|
599 | def test_should_escape_html_templates_only |
General Comments 0
You need to be logged in to leave comments.
Login now