diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-08-06 21:16:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-08-06 21:16:19 +0000 |
commit | 1949f61d0c37ddb4c8282abc291a18cf2444293b (patch) | |
tree | c19c2a949e3723c39639a03daab68ca1b163edf1 /test | |
parent | 3f1c35b71ea257bd012bc57f320399672d43591f (diff) | |
download | redmine-1949f61d0c37ddb4c8282abc291a18cf2444293b.tar.gz redmine-1949f61d0c37ddb4c8282abc291a18cf2444293b.zip |
Fixed: Custom fields of type version not proper handled in receiving e-mails (#11571).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10157 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/mail_handler_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index ce21f3cea..32646fcdd 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -182,6 +182,18 @@ class MailHandlerTest < ActiveSupport::TestCase assert !issue.description.match(/^searchable field:/i) end + def test_add_issue_with_version_custom_fields + field = IssueCustomField.create!(:name => 'Affected version', :field_format => 'version', :is_for_all => true, :tracker_ids => [1,2,3]) + + issue = submit_email('ticket_with_custom_fields.eml', :issue => {:project => 'ecookbook'}) do |email| + email << "Affected version: 1.0\n" + end + assert issue.is_a?(Issue) + assert !issue.new_record? + issue.reload + assert_equal '2', issue.custom_field_value(field) + end + def test_add_issue_with_cc issue = submit_email('ticket_with_cc.eml', :issue => {:project => 'ecookbook'}) assert issue.is_a?(Issue) |