Defect #29442 » test_add_issue_with_iso_2022_jp_ms_subject.diff
| test/fixtures/mail_handler/subject_japanese_3.eml (working copy) | ||
|---|---|---|
|
From: John Smith <JSmith@somenet.foo>
|
||
|
To: "redmine@somenet.foo" <redmine@somenet.foo>
|
||
|
Subject: =?iso-2022-jp?B?GyRCLSEbKEIgGyRCNF0/dDt6JUYlOSVIGyhC?=
|
||
|
Date: Mon, 27 Aug 2018 09:30:00 +0900
|
||
|
Message-ID: <87C31D42249DD0489D1A1444E3232DD7019D6183@foo.bar>
|
||
|
The subject contains a "CIRCLED DIGIT ONE" character (U+2460).
|
||
|
It is undefined in ISO-2022-JP but defined in some vendor-extended
|
||
|
variants define it.
|
||
| test/unit/mail_handler_test.rb (working copy) | ||
|---|---|---|
|
assert_equal ja, issue.subject
|
||
|
end
|
||
|
def test_add_issue_with_iso_2022_jp_ms_subject
|
||
|
issue = submit_email(
|
||
|
'subject_japanese_3.eml',
|
||
|
:issue => {:project => 'ecookbook'}
|
||
|
)
|
||
|
assert_kind_of Issue, issue
|
||
|
# The original subject is "① 丸数字テスト".
|
||
|
# CIRCLED DIGIT ONE character is not defined in ISO-2022-JP but
|
||
|
# defined in some vendor-extended variants such as ISO-2022-JP-MS.
|
||
|
# The character should be replaced with the replacement character
|
||
|
# instead of breaking the whole subject.
|
||
|
assert_match /丸数字テスト/, issue.subject
|
||
|
byebug
|
||
|
end
|
||
|
def test_should_ignore_emails_from_locked_users
|
||
|
User.find(2).lock!
|
||
- « Previous
- 1
- 2
- Next »