summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/time_entry_query_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/time_entry_query_test.rb b/test/unit/time_entry_query_test.rb
index e2f7caac2..2f6891893 100644
--- a/test/unit/time_entry_query_test.rb
+++ b/test/unit/time_entry_query_test.rb
@@ -108,4 +108,19 @@ class TimeEntryQueryTest < ActiveSupport::TestCase
query = TimeEntryQuery.new(:project => nil, :name => '_')
assert !query.available_filters.has_key?('issue.category_id')
end
+
+ def test_project_status_filter_should_be_available_in_global_queries
+ query = TimeEntryQuery.new(:project => nil, :name => '_')
+ assert query.available_filters.has_key?('project.status')
+ end
+
+ def test_project_status_filter_should_be_available_when_project_has_subprojects
+ query = TimeEntryQuery.new(:project => Project.find(1), :name => '_')
+ assert query.available_filters.has_key?('project.status')
+ end
+
+ def test_project_status_filter_should_not_be_available_when_project_is_leaf
+ query = TimeEntryQuery.new(:project => Project.find(2), :name => '_')
+ assert !query.available_filters.has_key?('project.status')
+ end
end