Truncate incoming email subject lines to 255 characters. #5698

Contributed by Jan

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3801 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-06-20 16:22:36 +00:00
parent c5863c0ad0
commit 4083e7e622
3 changed files with 64 additions and 1 deletions
+6
View File
@@ -349,6 +349,12 @@ class MailHandlerTest < ActiveSupport::TestCase
end
end
end
def test_email_with_long_subject_line
issue = submit_email('ticket_with_long_subject.eml')
assert issue.is_a?(Issue)
assert_equal issue.subject, 'New ticket on a given project with a very long subject line which exceeds 255 chars and should not be ignored but chopped off. And if the subject line is still not long enough, we just add more text. And more text. Wow, this is really annoying. Especially, if you have nothing to say...'[0,255]
end
private