mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
additional test for mail by Pavel Rosický (#24616)
git-svn-id: http://svn.redmine.org/redmine/trunk@16274 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b2c0ea2c3e
commit
3ac569c4d8
14
test/fixtures/mail_handler/invalid_utf8.eml
vendored
Normal file
14
test/fixtures/mail_handler/invalid_utf8.eml
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
From: John Smith <JSmith@somenet.foo>
|
||||
To: "redmine@somenet.foo" <redmine@somenet.foo>
|
||||
Subject: This is a test
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="_c20d9cfa-d16a-43a3-a7e5-71da7877ab23_"
|
||||
|
||||
--_c20d9cfa-d16a-43a3-a7e5-71da7877ab23_
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
=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
|
||||
|
||||
--_c20d9cfa-d16a-43a3-a7e5-71da7877ab23_--
|
||||
|
||||
@ -538,6 +538,16 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
assert_equal 'd8e8fca2dc0f896fd7cb4cb0031ba249', attachment.digest
|
||||
end
|
||||
|
||||
def test_invalid_utf8
|
||||
issue = submit_email(
|
||||
'invalid_utf8.eml',
|
||||
:issue => {:project => 'ecookbook'}
|
||||
)
|
||||
assert_kind_of Issue, issue
|
||||
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')
|
||||
assert_equal description, issue.description
|
||||
end
|
||||
|
||||
def test_gmail_with_attachment_ja
|
||||
issue = submit_email(
|
||||
'gmail_with_attachment_ja.eml',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user