diff options
Diffstat (limited to 'actionmailer/test/mail_service_test.rb')
-rwxr-xr-x | actionmailer/test/mail_service_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 96f80773b3..8116d41ca5 100755 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -98,6 +98,14 @@ class TestMailer < ActionMailer::Base @body = { "recipient" => recipient } end + def html_mail(recipient) + recipients recipient + subject "html mail" + from "test@example.com" + body "<em>Emphasize</em> <strong>this</strong>" + content_type "text/html" + end + class <<self attr_accessor :received_body end @@ -454,5 +462,10 @@ EOF assert_equal "text/plain", mail.parts[1].content_type end + def test_html_mail + mail = TestMailer.create_html_mail(@recipient) + assert_equal "text/html", mail.content_type + end + end |