diff options
author | Go MAEDA <maeda@farend.jp> | 2018-10-29 04:05:18 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-10-29 04:05:18 +0000 |
commit | a0479c768ef80cbdaaf858b7550793fd327fc04c (patch) | |
tree | ac6c30827f117d9175af9747d88f8da9ec9f9c7f /test/unit/time_entry_query_test.rb | |
parent | 21034c5628d980bd18c6ef3f3ef898969745c390 (diff) | |
download | redmine-a0479c768ef80cbdaaf858b7550793fd327fc04c.tar.gz redmine-a0479c768ef80cbdaaf858b7550793fd327fc04c.zip |
Filter time entries after project status (#20081).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17608 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/time_entry_query_test.rb')
-rw-r--r-- | test/unit/time_entry_query_test.rb | 15 |
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 |