summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-12 11:34:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-12 11:34:53 +0000
commite0e8c14c2aefd58267f7676b0342f04a37b08185 (patch)
tree97278cc1ba0c367136257b935fdb4510c127500a /test
parent0eb7d8f6149c8b328cbc612035b8b11e4be4b382 (diff)
downloadredmine-e0e8c14c2aefd58267f7676b0342f04a37b08185.tar.gz
redmine-e0e8c14c2aefd58267f7676b0342f04a37b08185.zip
Makes MailHandler accept all issue attributes and custom fields that can be set/updated (#4071, #4807, #5622, #6110).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4394 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/mail_handler/ticket_on_given_project.eml3
-rw-r--r--test/fixtures/mail_handler/ticket_reply_with_status.eml1
-rw-r--r--test/unit/mail_handler_test.rb5
3 files changed, 9 insertions, 0 deletions
diff --git a/test/fixtures/mail_handler/ticket_on_given_project.eml b/test/fixtures/mail_handler/ticket_on_given_project.eml
index cfc90b534..39790f287 100644
--- a/test/fixtures/mail_handler/ticket_on_given_project.eml
+++ b/test/fixtures/mail_handler/ticket_on_given_project.eml
@@ -54,4 +54,7 @@ Status: Resolved
due date: 2010-12-31
Start Date:2010-01-01
Assigned to: John Smith
+fixed version: alpha
+estimated hours: 2.5
+done ratio: 30
diff --git a/test/fixtures/mail_handler/ticket_reply_with_status.eml b/test/fixtures/mail_handler/ticket_reply_with_status.eml
index e7d68c3db..66ca730ac 100644
--- a/test/fixtures/mail_handler/ticket_reply_with_status.eml
+++ b/test/fixtures/mail_handler/ticket_reply_with_status.eml
@@ -29,6 +29,7 @@ Status: Resolved
due date: 2010-12-31
Start Date:2010-01-01
Assigned to: jsmith@somenet.foo
+searchable field: Updated custom value
------=_NextPart_000_0067_01C8D3CE.711F9CC0
Content-Type: text/html;
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index e59d78be9..ac8e10433 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -30,6 +30,7 @@ class MailHandlerTest < ActiveSupport::TestCase
:workflows,
:trackers,
:projects_trackers,
+ :versions,
:enumerations,
:issue_categories,
:custom_fields,
@@ -59,6 +60,9 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal '2010-01-01', issue.start_date.to_s
assert_equal '2010-12-31', issue.due_date.to_s
assert_equal User.find_by_login('jsmith'), issue.assigned_to
+ assert_equal Version.find_by_name('alpha'), issue.fixed_version
+ assert_equal 2.5, issue.estimated_hours
+ assert_equal 30, issue.done_ratio
# keywords should be removed from the email body
assert !issue.description.match(/^Project:/i)
assert !issue.description.match(/^Status:/i)
@@ -269,6 +273,7 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal '2010-01-01', issue.start_date.to_s
assert_equal '2010-12-31', issue.due_date.to_s
assert_equal User.find_by_login('jsmith'), issue.assigned_to
+ assert_equal 'Updated custom value', issue.custom_value_for(CustomField.find_by_name('Searchable field')).value
end
def test_add_issue_note_should_send_email_notification