summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-05-28 11:37:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-05-28 11:37:28 +0000
commitfad71f8b4bd8f1079c3fe355dc2dafeb2b5ca9ee (patch)
treee0fece80a486376643df4615940f7097c640e5d5 /test
parent95bf7fbc375014e942b11a341aeac757663328e8 (diff)
downloadredmine-fad71f8b4bd8f1079c3fe355dc2dafeb2b5ca9ee.tar.gz
redmine-fad71f8b4bd8f1079c3fe355dc2dafeb2b5ca9ee.zip
NoMethodError: undefined method `id' error on EnumerationFormat#value_from_keyword (#22911).
Patch by Haihan Ji. git-svn-id: http://svn.redmine.org/redmine/trunk@15429 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/field_format/enumeration_format_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/field_format/enumeration_format_test.rb b/test/unit/lib/redmine/field_format/enumeration_format_test.rb
index a78bdf137..467c1ed9d 100644
--- a/test/unit/lib/redmine/field_format/enumeration_format_test.rb
+++ b/test/unit/lib/redmine/field_format/enumeration_format_test.rb
@@ -84,4 +84,8 @@ class Redmine::EnumerationFieldFormatTest < ActionView::TestCase
end
end
end
+
+ def test_value_from_keyword_should_return_enumeration_id
+ assert_equal @foo.id, @field.value_from_keyword('foo', nil)
+ end
end