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
This commit is contained in:
Toshi MARUYAMA 2014-02-17 12:42:44 +00:00
parent 50ab5ec1b6
commit 14c02f50cc
2 changed files with 30 additions and 0 deletions

View File

@ -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--

View File

@ -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',