aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-06-03 10:57:06 +0000
committerJamis Buck <jamis@37signals.com>2005-06-03 10:57:06 +0000
commit100fd7269990d5ecb6dc0f9731cce6714d5ebf76 (patch)
tree482db8a714fbff36ded3c98547c544a41bdd10cf /actionmailer/test
parent887497b0bb8725018837ddce162363c5f0e3f0b9 (diff)
downloadrails-100fd7269990d5ecb6dc0f9731cce6714d5ebf76.tar.gz
rails-100fd7269990d5ecb6dc0f9731cce6714d5ebf76.tar.bz2
rails-100fd7269990d5ecb6dc0f9731cce6714d5ebf76.zip
Added a "content_type" accessor to allow messages to explicitly specify a content-type other than "text/plain" (the default).
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1382 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test')
-rwxr-xr-xactionmailer/test/mail_service_test.rb13
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