##// END OF EJS Templates
add test of receiving mail subject begins with encoding name (#12375)...
Toshi MARUYAMA -
r10584:1da74009cd3f
parent child
Show More
@@ -0,0 +1,7
1 From: John Smith <JSmith@somenet.foo>
2 To: "redmine@somenet.foo" <redmine@somenet.foo>
3 Subject: =?iso-2022-jp?b?GyRCJUYlOSVIGyhCCg=?=
4 Date: Fri, 1 Jun 2012 14:39:38 +0200
5 Message-ID: <87C31D42249DD0489D1A1444E3232DD7019D6183@foo.bar>
6
7 Fixture
@@ -382,6 +382,17 class MailHandlerTest < ActiveSupport::TestCase
382 382 assert_equal 'Testmail from Webmail: ä ö ü...', issue.subject
383 383 end
384 384
385 def test_add_issue_with_japanese_subject
386 issue = submit_email(
387 'subject_japanese_1.eml',
388 :issue => {:project => 'ecookbook'}
389 )
390 assert_kind_of Issue, issue
391 ja = "\xe3\x83\x86\xe3\x82\xb9\xe3\x83\x88"
392 ja.force_encoding('UTF-8') if ja.respond_to?(:force_encoding)
393 assert_equal ja, issue.subject
394 end
395
385 396 def test_should_ignore_emails_from_locked_users
386 397 User.find(2).lock!
387 398
General Comments 0
You need to be logged in to leave comments. Login now