aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2006-03-18 23:53:07 +0000
committerJamis Buck <jamis@37signals.com>2006-03-18 23:53:07 +0000
commitdb0e8ff1c3496841d7a307794dacecd82e55ce6a (patch)
tree0d266f44bcdc87d47ce149856c6e1c8198f8a9a5 /actionmailer/test
parent9c9069a67595f620f80eabc475181cb36a26cdde (diff)
downloadrails-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-xactionmailer/test/mail_service_test.rb14
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