diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-05-28 23:45:45 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-05-28 23:45:45 +0000 |
commit | 080dc2212efdb7c91c43ff672ca91cc55b75d6a0 (patch) | |
tree | 850adac3514de4d306d08f4776b2c68f502b014a /test | |
parent | af726ea8f02a65dcce23bdde0074db9499a8642c (diff) | |
download | redmine-080dc2212efdb7c91c43ff672ca91cc55b75d6a0.tar.gz redmine-080dc2212efdb7c91c43ff672ca91cc55b75d6a0.zip |
Add 'Start date' and 'End date' keywords for incoming email. #5595
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3763 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/mail_handler/ticket_on_given_project.eml | 3 | ||||
-rw-r--r-- | test/fixtures/mail_handler/ticket_reply_with_status.eml | 3 | ||||
-rw-r--r-- | test/unit/mail_handler_test.rb | 6 |
3 files changed, 10 insertions, 2 deletions
diff --git a/test/fixtures/mail_handler/ticket_on_given_project.eml b/test/fixtures/mail_handler/ticket_on_given_project.eml index 372e7302c..f62d9d63d 100644 --- a/test/fixtures/mail_handler/ticket_on_given_project.eml +++ b/test/fixtures/mail_handler/ticket_on_given_project.eml @@ -51,4 +51,5 @@ pulvinar dui, a gravida orci mi eget odio. Nunc a lacus. Project: onlinestore
Status: Resolved
-
+due date: 2010-12-31
+Start Date:2010-01-01
diff --git a/test/fixtures/mail_handler/ticket_reply_with_status.eml b/test/fixtures/mail_handler/ticket_reply_with_status.eml index ab799198b..90ed6d705 100644 --- a/test/fixtures/mail_handler/ticket_reply_with_status.eml +++ b/test/fixtures/mail_handler/ticket_reply_with_status.eml @@ -26,6 +26,9 @@ Content-Transfer-Encoding: quoted-printable This is reply Status: Resolved +due date: 2010-12-31 +Start Date:2010-01-01 + ------=_NextPart_000_0067_01C8D3CE.711F9CC0 Content-Type: text/html; charset="utf-8" diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index b8549a404..afc2029b8 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -55,6 +55,8 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal Project.find(2), issue.project assert_equal IssueStatus.find_by_name('Resolved'), issue.status assert issue.description.include?('Lorem ipsum dolor sit amet, consectetuer adipiscing elit.') + assert_equal '2010-01-01', issue.start_date.to_s + assert_equal '2010-12-31', issue.due_date.to_s # keywords should be removed from the email body assert !issue.description.match(/^Project:/i) assert !issue.description.match(/^Status:/i) @@ -243,7 +245,7 @@ class MailHandlerTest < ActiveSupport::TestCase assert_match /This is reply/, journal.notes end - def test_add_issue_note_with_status_change + def test_add_issue_note_with_attribute_changes # This email contains: 'Status: Resolved' journal = submit_email('ticket_reply_with_status.eml') assert journal.is_a?(Journal) @@ -252,6 +254,8 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal Issue.find(2), journal.journalized assert_match /This is reply/, journal.notes assert_equal IssueStatus.find_by_name("Resolved"), issue.status + assert_equal '2010-01-01', issue.start_date.to_s + assert_equal '2010-12-31', issue.due_date.to_s end def test_add_issue_note_should_send_email_notification |