mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-24 09:21:12 +00:00
Test for r19588 (#33085).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@19589 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
34977f9199
commit
67212d1d00
@ -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 => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user