Merged r2209 to r2211 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2229 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-04 13:03:34 +00:00
parent 31178553f3
commit c9d4d3a2be
8 changed files with 102 additions and 8 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)