diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-01 13:56:25 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-01 13:56:25 +0000 |
commit | 2be6f54f23451043f3bd94a6d3da601ddc39780f (patch) | |
tree | 2bbffc83e4184ec58e5cd0aecdbf7cf735862ec4 /test/unit/custom_field_user_format_test.rb | |
parent | 1cd6a2aa84db83b127cc037021dc6351877790d0 (diff) | |
download | redmine-2be6f54f23451043f3bd94a6d3da601ddc39780f.tar.gz redmine-2be6f54f23451043f3bd94a6d3da601ddc39780f.zip |
Fixes #possible_values_options when given an object with nil project.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5273 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/custom_field_user_format_test.rb')
-rw-r--r-- | test/unit/custom_field_user_format_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/custom_field_user_format_test.rb b/test/unit/custom_field_user_format_test.rb index 085e4c73a..5cc4ea5c1 100644 --- a/test/unit/custom_field_user_format_test.rb +++ b/test/unit/custom_field_user_format_test.rb @@ -36,6 +36,11 @@ class CustomFieldUserFormatTest < ActiveSupport::TestCase assert_equal project.users.sort.collect(&:id).map(&:to_s), possible_values end + def test_possible_values_with_nil_project_resource + project = Project.find(1) + assert_equal [], @field.possible_values(Issue.new) + end + def test_possible_values_options_with_no_arguments assert_equal [], @field.possible_values_options assert_equal [], @field.possible_values_options(nil) |