summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-17 21:29:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-17 21:29:22 +0000
commit4a5ebfb778455ce0e0a989942714511a7f97f756 (patch)
treeb3f53882f919a51964fa002d0e9074a4a4868f37 /test
parent82afdc7f78581d7c209926c0cce2eaee10915c4d (diff)
downloadredmine-4a5ebfb778455ce0e0a989942714511a7f97f756.tar.gz
redmine-4a5ebfb778455ce0e0a989942714511a7f97f756.zip
Fixed that Query#has_column? returns false with default columns.
git-svn-id: http://svn.redmine.org/redmine/trunk@16217 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/query_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb
index 6b555b94a..e6761c211 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -1170,6 +1170,14 @@ class QueryTest < ActiveSupport::TestCase
assert !q.has_column?(category_column)
end
+ def test_has_column_should_return_true_for_default_column
+ with_settings :issue_list_default_columns => %w(tracker subject) do
+ q = IssueQuery.new
+ assert q.has_column?(:tracker)
+ assert !q.has_column?(:category)
+ end
+ end
+
def test_inline_and_block_columns
q = IssueQuery.new
q.column_names = ['subject', 'description', 'tracker']