summaryrefslogtreecommitdiffstats
path: root/test/unit/custom_field_user_format_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-04-01 13:56:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-04-01 13:56:25 +0000
commit2be6f54f23451043f3bd94a6d3da601ddc39780f (patch)
tree2bbffc83e4184ec58e5cd0aecdbf7cf735862ec4 /test/unit/custom_field_user_format_test.rb
parent1cd6a2aa84db83b127cc037021dc6351877790d0 (diff)
downloadredmine-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.rb5
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)