diff options
author | Go MAEDA <maeda@farend.jp> | 2020-03-20 02:31:13 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-03-20 02:31:13 +0000 |
commit | 67212d1d00fe59b280cdf836a868baafba6cc2ba (patch) | |
tree | 85e56a91f888389f2b0f74ed87c34554ce333340 | |
parent | 34977f91991258017fcf4f4968f909086e1019db (diff) | |
download | redmine-67212d1d00fe59b280cdf836a868baafba6cc2ba.tar.gz redmine-67212d1d00fe59b280cdf836a868baafba6cc2ba.zip |
Test for r19588 (#33085).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@19589 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/enumerations_controller_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/enumerations_controller_test.rb b/test/functional/enumerations_controller_test.rb index 05e631106..438ef9f7b 100644 --- a/test/functional/enumerations_controller_test.rb +++ b/test/functional/enumerations_controller_test.rb @@ -84,6 +84,21 @@ class EnumerationsControllerTest < Redmine::ControllerTest assert_equal "sample", Enumeration.find_by(:name => 'Sample').custom_field_values.last.value end + def test_create_with_multiple_select_list_custom_fields + custom_field = IssuePriorityCustomField.generate!(:field_format => 'list', :multiple => true, :possible_values => ['1', '2', '3', '4']) + assert_difference 'IssuePriority.count' do + post :create, :params => { + :enumeration => { + :type => 'IssuePriority', + :name => 'Sample', + :custom_field_values => {custom_field.id.to_s => ['1', '2']} + } + } + end + assert_redirected_to '/enumerations' + assert_equal ['1', '2'].sort, Enumeration.find_by(:name => 'Sample').custom_field_values.last.value.sort + end + def test_create_with_failure assert_no_difference 'IssuePriority.count' do post :create, :params => { |