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:
+10
-2
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user