Extract visibility condition from project statement and use visible scopes instead.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5442 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-04-12 16:53:39 +00:00
parent 949b355ef2
commit 1242e448f3
2 changed files with 19 additions and 9 deletions
+10 -2
View File
@@ -1,5 +1,5 @@
# redMine - project management software
# Copyright (C) 2006-2008 Jean-Philippe Lang
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -218,6 +218,14 @@ class QueryTest < ActiveSupport::TestCase
User.current = nil
end
def test_statement_should_be_nil_with_no_filters
q = Query.new(:name => '_')
q.filters = {}
assert q.valid?
assert_nil q.statement
end
def test_default_columns
q = Query.new
assert !q.columns.empty?