diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-17 12:42:44 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-17 12:42:44 +0000 |
commit | 14c02f50cc44ec1c6c21614f4563136aff01364f (patch) | |
tree | d4552c18697e500449dc9650d4778d4716a30d94 | |
parent | 50ab5ec1b6533de4f065125999a4ed3d3e81485c (diff) | |
download | redmine-14c02f50cc44ec1c6c21614f4563136aff01364f.tar.gz redmine-14c02f50cc44ec1c6c21614f4563136aff01364f.zip |
add test of quoted printable UTF-8 mail reviving (#14675)
git-svn-id: http://svn.redmine.org/redmine/trunk@12901 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/fixtures/mail_handler/quoted_printable_utf8.eml | 19 | ||||
-rw-r--r-- | test/unit/mail_handler_test.rb | 11 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/fixtures/mail_handler/quoted_printable_utf8.eml b/test/fixtures/mail_handler/quoted_printable_utf8.eml new file mode 100644 index 000000000..ae31ffc90 --- /dev/null +++ b/test/fixtures/mail_handler/quoted_printable_utf8.eml @@ -0,0 +1,19 @@ +Date: Tue, 13 Aug 2013 10:56:04 +0700 +From: John Smith <JSmith@somenet.foo> +Content-Type: multipart/alternative; boundary=001a11c260fa53f8dc04e3cc380b +Subject: issue 14675 +To: redmine@somenet.foo + +--001a11c260fa53f8dc04e3cc380b +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +Freundliche Gr=C3=BCsse + +--001a11c260fa53f8dc04e3cc380b +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +<div dir=3D"ltr">Freundliche Gr=C3=BCsse<br></div> + +--001a11c260fa53f8dc04e3cc380b-- diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 8b2f6e298..09b37e06f 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -529,6 +529,17 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal str, issue.subject end + def test_quoted_printable_utf8 + issue = submit_email( + 'quoted_printable_utf8.eml', + :issue => {:project => 'ecookbook'} + ) + assert_kind_of Issue, issue + str = "Freundliche Gr\xc3\xbcsse" + str.force_encoding('UTF-8') if str.respond_to?(:force_encoding) + assert_equal str, issue.description + end + def test_add_issue_with_japanese_subject issue = submit_email( 'subject_japanese_1.eml', |