test_issue_subject_truncate.patch

Yuichi HARADA, 2019-06-18 09:15

Download (1.68 KB)

View differences:

test/fixtures/mail_handler/ticket_with_mixed_single_and_multi_bytes_subject.eml
1
To: redmine@somenet.foo
2
From: John Smith <JSmith@somenet.foo>
3
Subject: =?UTF-8?B?W+e3iuaApV1bUkVETUlORV1bV0FSTklORzAxXVByb2JsZW06IOODoQ==?=
4
 =?UTF-8?B?44Oi44Oq5a656YeP44GM6YC86L+r44GX44Gm44GE44G+44GZ?=
5
Message-ID: <42feb4b3-4dec-7c61-0edd-45dfc4795143@somenet.foo>
6
Date: Tue, 18 Jun 2019 14:08:06 +0900
7
MIME-Version: 1.0
8
Content-Type: text/plain; charset=utf-8; format=flowed
9
Content-Language: en-US
10
Content-Transfer-Encoding: 7bit
11

  
12
Problem started at 13:49:27 on 2019.06.18
test/unit/mail_handler_test.rb
1158 1158
    assert_equal 'αβγδεζηθικλμνξοπρςστυφχψω', issue.subject
1159 1159
  end
1160 1160

  
1161
  def test_email_with_mixed_single_and_multi_bytes_subject
1162
    issue = submit_email(
1163
              'ticket_with_mixed_single_and_multi_bytes_subject.eml',
1164
              :issue => {:project => 'ecookbook'}
1165
            )
1166
    assert issue.is_a?(Issue)
1167
    assert_equal '[緊急][REDMINE][WARNING01]Problem: メモリ容量が逼迫しています', issue.subject
1168
  end
1169

  
1161 1170
  def test_first_keyword_should_be_matched
1162 1171
    issue = submit_email('ticket_with_duplicate_keyword.eml', :allow_override => 'priority')
1163 1172
    assert issue.is_a?(Issue)