diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2008-08-20 06:21:06 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2008-08-20 06:21:06 +0000 |
commit | 2f3f2d8b12483b72f78f7f4704d8641451b16832 (patch) | |
tree | 98742d143b5e0ce8a89278e7f638af387fc3d200 /test/unit | |
parent | 6db8fa8ef762bafb09ce1c2419a8392e119caece (diff) | |
download | redmine-2f3f2d8b12483b72f78f7f4704d8641451b16832.tar.gz redmine-2f3f2d8b12483b72f78f7f4704d8641451b16832.zip |
Added the "Status:" keyword to the MailHandler for setting and changing an Issue status via email.
#1669
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1751 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/mail_handler_test.rb | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 6e8a47c35..b3628e0d5 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -45,6 +45,16 @@ class MailHandlerTest < Test::Unit::TestCase assert_equal Project.find(2), issue.project assert issue.description.include?('Lorem ipsum dolor sit amet, consectetuer adipiscing elit.') end + + def test_add_issue_with_status + # This email contains: 'Project: onlinestore' and 'Status: Resolved' + issue = submit_email('ticket_on_given_project.eml') + assert issue.is_a?(Issue) + assert !issue.new_record? + issue.reload + assert_equal Project.find(2), issue.project + assert_equal IssueStatus.find_by_name("Resolved"), issue.status + end def test_add_issue_with_attributes_override issue = submit_email('ticket_with_attributes.eml', :allow_override => 'tracker,category,priority') @@ -95,7 +105,18 @@ class MailHandlerTest < Test::Unit::TestCase assert journal.is_a?(Journal) assert_equal User.find_by_login('jsmith'), journal.user assert_equal Issue.find(2), journal.journalized - assert_equal 'This is reply', journal.notes + assert_match /This is reply/, journal.notes + end + + def test_add_issue_note_with_status_change + # This email contains: 'Status: Resolved' + journal = submit_email('ticket_reply_with_status.eml') + assert journal.is_a?(Journal) + issue = Issue.find(journal.issue.id) + assert_equal User.find_by_login('jsmith'), journal.user + assert_equal Issue.find(2), journal.journalized + assert_match /This is reply/, journal.notes + assert_equal IssueStatus.find_by_name("Resolved"), issue.status end private |