aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-21 12:10:47 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-21 12:10:47 +0000
commitcb69736a1084d5412ede7628f864eccc356bb88c (patch)
tree342c26d2674b76be5d7fc23ad205accce20ea52c /actionmailer/test
parent553f115be537e279cf5432d650225184d87c4eff (diff)
downloadrails-cb69736a1084d5412ede7628f864eccc356bb88c.tar.gz
rails-cb69736a1084d5412ede7628f864eccc356bb88c.tar.bz2
rails-cb69736a1084d5412ede7628f864eccc356bb88c.zip
Made the unquoted subject and body the default
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test')
-rwxr-xr-xactionmailer/test/mail_service_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index 45423a1960..262ce988a2 100755
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -212,5 +212,21 @@ class ActionMailerTest < Test::Unit::TestCase
assert_equal 1, ActionMailer::Base.deliveries.size
end
+ def test_unquote_subject
+ msg = <<EOF
+From: me@example.com
+Subject: =?utf-8?Q?testing_testing_=D6=A4?=
+Content-Type: text/plain; charset=iso-8859-1
+
+This_is_a_test
+2 + 2 =3D 4
+EOF
+ mail = TMail::Mail.parse(msg)
+ assert_equal "testing testing \326\244", mail.subject
+ assert_equal "=?utf-8?Q?testing_testing_=D6=A4?=", mail.quoted_subject
+ assert_equal "This is a test\n2 + 2 = 4\n", mail.body
+ assert_equal "This_is_a_test\n2 + 2 =3D 4\n", mail.quoted_body
+ end
+
end