summaryrefslogtreecommitdiffstats
path: root/test/unit/query_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/query_test.rb')
-rw-r--r--test/unit/query_test.rb13
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