Defect #24616 » invalid_utf8_test.patch
| fixtures/mail_handler/invalid_utf8.eml (working copy) | ||
|---|---|---|
| 1 |
From: John Smith <JSmith@somenet.foo> |
|
| 2 |
To: "redmine@somenet.foo" <redmine@somenet.foo> |
|
| 3 |
Subject: This is a test |
|
| 4 |
Content-Type: multipart/alternative; |
|
| 5 |
boundary="_c20d9cfa-d16a-43a3-a7e5-71da7877ab23_" |
|
| 6 |
|
|
| 7 |
--_c20d9cfa-d16a-43a3-a7e5-71da7877ab23_ |
|
| 8 |
Content-Type: text/plain; charset="utf-8" |
|
| 9 |
Content-Transfer-Encoding: quoted-printable |
|
| 10 |
|
|
| 11 |
=D0=97=D0=B4=D1=80=D0=B0=D0=B2=D1=81=D1=82=D0=B2=D1=83=D0=B9=D1=82=D0=B5=AA |
|
| 12 |
|
|
| 13 |
--_c20d9cfa-d16a-43a3-a7e5-71da7877ab23_-- |
|
| 14 |
|
|
| unit/mail_handler_test.rb (working copy) | ||
|---|---|---|
| 538 | 538 |
assert_equal 'd8e8fca2dc0f896fd7cb4cb0031ba249', attachment.digest |
| 539 | 539 |
end |
| 540 | 540 | |
| 541 |
def test_invalid_utf8 |
|
| 542 |
issue = submit_email( |
|
| 543 |
'invalid_utf8.eml', |
|
| 544 |
:issue => {:project => 'ecookbook'}
|
|
| 545 |
) |
|
| 546 |
assert_kind_of Issue, issue |
|
| 547 |
description = "\xD0\x97\xD0\xB4\xD1\x80\xD0\xB0\xD0\xB2\xD1\x81\xD1\x82\xD0\xB2\xD1\x83\xD0\xB9\xD1\x82\xD0\xB5?".force_encoding('UTF-8')
|
|
| 548 |
assert_equal description, issue.description |
|
| 549 |
end |
|
| 550 | ||
| 541 | 551 |
def test_gmail_with_attachment_ja |
| 542 | 552 |
issue = submit_email( |
| 543 | 553 |
'gmail_with_attachment_ja.eml', |