mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
Fixed: empty list for user/version custom fields on bulk edit form (#2096).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5354 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -53,6 +53,13 @@ class CustomFieldUserFormatTest < ActiveSupport::TestCase
|
||||
assert_equal project.users.sort.map {|u| [u.name, u.id.to_s]}, possible_values_options
|
||||
end
|
||||
|
||||
def test_possible_values_options_with_array
|
||||
projects = Project.find([1, 2])
|
||||
possible_values_options = @field.possible_values_options(projects)
|
||||
assert possible_values_options.any?
|
||||
assert_equal (projects.first.users & projects.last.users).sort.map {|u| [u.name, u.id.to_s]}, possible_values_options
|
||||
end
|
||||
|
||||
def test_cast_blank_value
|
||||
assert_equal nil, @field.cast_value(nil)
|
||||
assert_equal nil, @field.cast_value("")
|
||||
|
||||
Reference in New Issue
Block a user