summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-09-20 07:51:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-09-20 07:51:37 +0000
commit8ae41b4846fc46cb521599c0b10fad8e424069f7 (patch)
tree318731e4cc94522ffcafc13500d13a27a9417b7b /test/unit
parentb519aba63ee0043ffd60f9002fc236f717d9f172 (diff)
downloadredmine-8ae41b4846fc46cb521599c0b10fad8e424069f7.tar.gz
redmine-8ae41b4846fc46cb521599c0b10fad8e424069f7.zip
Ignore email keywords after truncation line (#8758).
git-svn-id: http://svn.redmine.org/redmine/trunk@13413 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/mail_handler_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 6c3aefc41..1a3469031 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -856,6 +856,20 @@ class MailHandlerTest < ActiveSupport::TestCase
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
+ def test_first_keyword_should_be_matched
+ issue = submit_email('ticket_with_duplicate_keyword.eml', :allow_override => 'priority')
+ assert issue.is_a?(Issue)
+ assert_equal 'High', issue.priority.name
+ end
+
+ def test_keyword_after_delimiter_should_be_ignored
+ with_settings :mail_handler_body_delimiters => "== DELIMITER ==" do
+ issue = submit_email('ticket_with_keyword_after_delimiter.eml', :allow_override => 'priority')
+ assert issue.is_a?(Issue)
+ assert_equal 'Normal', issue.priority.name
+ end
+ end
+
def test_new_user_from_attributes_should_return_valid_user
to_test = {
# [address, name] => [login, firstname, lastname]