diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-01 08:44:17 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-01 08:44:17 +0000 |
commit | e5f5671d66295100d719d4712a03015268d65e02 (patch) | |
tree | 3fd5ffdf275047e85b4c5c1a6e77cd2ca6b7c2ac /test | |
parent | 427b47b4d72276b5c80d79cd5f8e16c2aa31da1e (diff) | |
download | redmine-e5f5671d66295100d719d4712a03015268d65e02.tar.gz redmine-e5f5671d66295100d719d4712a03015268d65e02.zip |
Added the ability to customize columns of a saved query.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@782 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/query_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index ea004e39e..c00f47e5d 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -28,4 +28,17 @@ class QueryTest < Test::Unit::TestCase assert_equal 1, issues.length assert_equal Issue.find(3), issues.first end + + def test_default_columns + q = Query.new + assert !q.columns.empty? + end + + def test_set_column_names + q = Query.new + q.column_names = ['tracker', :subject, '', 'unknonw_column'] + assert_equal [:tracker, :subject], q.columns.collect {|c| c.name} + c = q.columns.first + assert q.has_column?(c) + end end |