summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2017-06-06 01:34:52 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2017-06-06 01:34:52 +0000
commit8c03f2a6db22600ea650a516a047a3902917dc01 (patch)
treeb0e53c2ca9006aa1cf5d6b79a35c7ef566ded280 /test
parent5b61d569437221f7aaa3d02df298039e8a32ff4a (diff)
downloadredmine-8c03f2a6db22600ea650a516a047a3902917dc01.tar.gz
redmine-8c03f2a6db22600ea650a516a047a3902917dc01.zip
allow unicode whitespace after mail handler body delimiters (#17718)
Contributed by Holger Just and Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16609 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/mail_handler/ticket_on_given_project.eml6
-rw-r--r--test/unit/mail_handler_test.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/test/fixtures/mail_handler/ticket_on_given_project.eml b/test/fixtures/mail_handler/ticket_on_given_project.eml
index 7c0fe3208..e311dfbb7 100644
--- a/test/fixtures/mail_handler/ticket_on_given_project.eml
+++ b/test/fixtures/mail_handler/ticket_on_given_project.eml
@@ -10,9 +10,9 @@ Date: Sun, 22 Jun 2008 12:28:07 +0200
MIME-Version: 1.0
Content-Type: text/plain;
format=flowed;
- charset="iso-8859-1";
+ charset="utf-8";
reply-type=original
-Content-Transfer-Encoding: 7bit
+Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
@@ -47,7 +47,7 @@ BREAK
This paragraph is between delimiters.
----
+---=C2=A0
This paragraph is after the delimiter so it shouldn't appear.
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index cbfcfa7ad..d5ca795ef 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -963,7 +963,7 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_issue_created(issue)
assert issue.description.include?('This paragraph is before delimiters')
assert issue.description.include?('--- This line starts with a delimiter')
- assert !issue.description.match(/^---$/)
+ assert !issue.description.match(/^---#{"\u00A0"}$/)
assert !issue.description.include?('This paragraph is after the delimiter')
end
end