Import custom fields values from emails (#2413).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2211 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-30 14:57:33 +00:00
parent 2355324d73
commit 421539e3be
3 changed files with 62 additions and 3 deletions
+12 -1
View File
@@ -28,7 +28,9 @@ class MailHandlerTest < Test::Unit::TestCase
:trackers,
:projects_trackers,
:enumerations,
:issue_categories
:issue_categories,
:custom_fields,
:custom_fields_trackers
FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures/mail_handler'
@@ -102,6 +104,15 @@ class MailHandlerTest < Test::Unit::TestCase
assert_equal 10790, issue.attachments.first.filesize
end
def test_add_issue_with_custom_fields
issue = submit_email('ticket_with_custom_fields.eml', :issue => {:project => 'onlinestore'})
assert issue.is_a?(Issue)
assert !issue.new_record?
issue.reload
assert_equal 'New ticket with custom field values', issue.subject
assert_equal 'Value for a custom field', issue.custom_value_for(CustomField.find_by_name('Searchable field')).value
end
def test_add_issue_with_cc
issue = submit_email('ticket_with_cc.eml', :issue => {:project => 'ecookbook'})
assert issue.is_a?(Issue)