diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-04 21:00:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-04 21:00:59 +0000 |
commit | bc3bd8aff2a7468a87211775be679b96e5c509dc (patch) | |
tree | 3b3895eff44e446b3903f38918446d8196451361 /test/unit | |
parent | 4cd67587ce338cee281ac01bc5144f5c839b74db (diff) | |
download | redmine-bc3bd8aff2a7468a87211775be679b96e5c509dc.tar.gz redmine-bc3bd8aff2a7468a87211775be679b96e5c509dc.zip |
Let QueryColumn accept a Proc as caption (#18276).
git-svn-id: http://svn.redmine.org/redmine/trunk@13558 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/query_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index c9c669387..bf3dcd5e8 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -1415,4 +1415,14 @@ class QueryTest < ActiveSupport::TestCase end end end + + def test_query_column_should_accept_a_symbol_as_caption + c = QueryColumn.new('foo', :caption => :general_text_Yes) + assert_equal 'Yes', c.caption + end + + def test_query_column_should_accept_a_proc_as_caption + c = QueryColumn.new('foo', :caption => lambda {'Foo'}) + assert_equal 'Foo', c.caption + end end |