summaryrefslogtreecommitdiffstats
path: root/test/unit/mail_handler_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-08 19:55:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-08 19:55:56 +0000
commitf338fe9075e16de82a3bcbc860675d3404e8a774 (patch)
treee3fa5e7fd638a65ac22e4767e59d6caa761ee1a4 /test/unit/mail_handler_test.rb
parenta63908c5eda2747eb40c6880d7b04ee8b706d9fe (diff)
downloadredmine-f338fe9075e16de82a3bcbc860675d3404e8a774.tar.gz
redmine-f338fe9075e16de82a3bcbc860675d3404e8a774.zip
Allow to set multiple values in emails for list custom fields (#16549).
git-svn-id: http://svn.redmine.org/redmine/trunk@16380 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r--test/unit/mail_handler_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 5f0b3e3e0..e6c20481e 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -232,8 +232,10 @@ class MailHandlerTest < ActiveSupport::TestCase
end
def test_add_issue_with_custom_fields
+ mutiple = IssueCustomField.generate!(:field_format => 'list', :name => 'OS', :multiple => true, :possible_values => ['Linux', 'Windows', 'Mac OS X'])
+
issue = submit_email('ticket_with_custom_fields.eml',
- :issue => {:project => 'onlinestore'}, :allow_override => ['database', 'Searchable_field']
+ :issue => {:project => 'onlinestore'}, :allow_override => ['database', 'Searchable_field', 'OS']
)
assert issue.is_a?(Issue)
assert !issue.new_record?
@@ -241,6 +243,7 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal 'New ticket with custom field values', issue.subject
assert_equal 'PostgreSQL', issue.custom_field_value(1)
assert_equal 'Value for a custom field', issue.custom_field_value(2)
+ assert_equal ['Mac OS X', 'Windows'], issue.custom_field_value(mutiple.id).sort
assert !issue.description.match(/^searchable field:/i)
end