diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-10 08:15:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-10 08:15:22 +0000 |
commit | 26ff9e1c260b6cbb02371f72047e3108a93aee75 (patch) | |
tree | cb3fa8b733dfa47e22a04d34834f8fc600ab55d3 /test | |
parent | c73823cd0f1524811f214b66bcc8cddd3e245e18 (diff) | |
download | redmine-26ff9e1c260b6cbb02371f72047e3108a93aee75.tar.gz redmine-26ff9e1c260b6cbb02371f72047e3108a93aee75.zip |
Fixed: German umlauts in Subject get striped with ruby1.8 (#11065).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9796 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/mail_handler/subject_as_iso-8859-1.eml | 11 | ||||
-rw-r--r-- | test/unit/mail_handler_test.rb | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/fixtures/mail_handler/subject_as_iso-8859-1.eml b/test/fixtures/mail_handler/subject_as_iso-8859-1.eml new file mode 100644 index 000000000..45f725bdf --- /dev/null +++ b/test/fixtures/mail_handler/subject_as_iso-8859-1.eml @@ -0,0 +1,11 @@ +Content-Type: application/ms-tnef; name="winmail.dat" +Content-Transfer-Encoding: binary +From: John Smith <JSmith@somenet.foo> +To: "redmine@somenet.foo" <redmine@somenet.foo> +Subject: =?iso-8859-1?Q?Testmail_from_Webmail:_=E4_=F6_=FC...?= +Date: Fri, 1 Jun 2012 14:39:38 +0200 +Message-ID: <87C31D42249DD0489D1A1444E3232DD7019D6183@foo.bar> +Accept-Language: de-CH, en-US +Content-Language: de-CH + +Fixture diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 8f916949e..68a0c8f2e 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -347,6 +347,15 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 'caaf384198bcbc9563ab5c058acd73cd', attachment.digest end + def test_add_issue_with_iso_8859_1_subject + issue = submit_email( + 'subject_as_iso-8859-1.eml', + :issue => {:project => 'ecookbook'} + ) + assert_kind_of Issue, issue + assert_equal 'Testmail from Webmail: ä ö ü...', issue.subject + end + def test_should_ignore_emails_from_locked_users User.find(2).lock! |