summaryrefslogtreecommitdiffstats
path: root/test/unit/query_test.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-11-28 22:41:53 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-11-28 22:41:53 +0000
commit7c80efae717e0f63350829250e2183e0b44e6645 (patch)
tree7e752fbe4b265b2dbd5d36b611618998b70a25a8 /test/unit/query_test.rb
parent1242f8d48ae76fb2d745e183aa92583f426d65ad (diff)
downloadredmine-7c80efae717e0f63350829250e2183e0b44e6645.tar.gz
redmine-7c80efae717e0f63350829250e2183e0b44e6645.zip
Query display types should accept only known types (#37925).
Patch by Alexander Meindl. git-svn-id: https://svn.redmine.org/redmine/trunk@21965 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/query_test.rb')
-rw-r--r--test/unit/query_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb
index 1591e985e..e4ac5bd6f 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -2880,4 +2880,18 @@ class QueryTest < ActiveSupport::TestCase
assert_equal 1, query.issue_count
end
+
+ def test_display_type_should_accept_known_types
+ query = ProjectQuery.new(:name => '_')
+ query.display_type = 'list'
+
+ assert_equal 'list', query.display_type
+ end
+
+ def test_display_type_should_not_accept_unknown_types
+ query = ProjectQuery.new(:name => '_')
+ query.display_type = 'invalid'
+
+ assert_equal 'board', query.display_type
+ end
end