diff options
author | Jamis Buck <jamis@37signals.com> | 2006-03-18 23:53:07 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-03-18 23:53:07 +0000 |
commit | db0e8ff1c3496841d7a307794dacecd82e55ce6a (patch) | |
tree | 0d266f44bcdc87d47ce149856c6e1c8198f8a9a5 /actionmailer/test | |
parent | 9c9069a67595f620f80eabc475181cb36a26cdde (diff) | |
download | rails-db0e8ff1c3496841d7a307794dacecd82e55ce6a.tar.gz rails-db0e8ff1c3496841d7a307794dacecd82e55ce6a.tar.bz2 rails-db0e8ff1c3496841d7a307794dacecd82e55ce6a.zip |
Parse content-type apart before using it so that sub-parts of the header can be set correctly (closes #2918)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3959 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test')
-rwxr-xr-x | actionmailer/test/mail_service_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index b60b1c1b8b..0689bf6728 100755 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -246,6 +246,14 @@ class TestMailer < ActionMailer::Base body "testing" end + def custom_content_type_attributes + recipients "no.one@nowhere.test" + subject "custom content types" + from "some.one@somewhere.test" + content_type "text/plain; format=flowed" + body "testing" + end + class <<self attr_accessor :received_body end @@ -787,5 +795,11 @@ EOF mail = FunkyPathMailer.create_multipart_with_template_path_with_dots(@recipient) assert_equal 2, mail.parts.length end + + def test_custom_content_type_attributes + mail = TestMailer.create_custom_content_type_attributes + assert_match %r{format=flowed}, mail['content-type'].to_s + assert_match %r{charset=utf-8}, mail['content-type'].to_s + end end |