Skip to content

Commit

Permalink
add test of gmail ISO-8859-2 mail receiving (#16122)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.redmine.org/redmine/trunk@12903 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
marutosi committed Feb 18, 2014
1 parent cce9221 commit b5d8045
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/fixtures/mail_handler/gmail-iso8859-2.eml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Date: Tue, 13 Aug 2013 10:56:04 +0700
From: John Smith <[email protected]>
Subject: =?ISO-8859-2?Q?Nikad_vi=B9e?=
To: [email protected]
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

Na =B9triku se su=B9i =B9osi=E6.

--=20
=B9osi=E6
11 changes: 11 additions & 0 deletions test/unit/mail_handler_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,17 @@ def test_quoted_printable_utf8
assert_equal str, issue.description
end

def test_gmail_iso8859_2
issue = submit_email(
'gmail-iso8859-2.eml',
:issue => {:project => 'ecookbook'}
)
assert_kind_of Issue, issue
str = "Na \xc5\xa1triku se su\xc5\xa1i \xc5\xa1osi\xc4\x87."
str.force_encoding('UTF-8') if str.respond_to?(:force_encoding)
assert issue.description.include?(str)
end

def test_add_issue_with_japanese_subject
issue = submit_email(
'subject_japanese_1.eml',
Expand Down

0 comments on commit b5d8045

Please sign in to comment.