diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-13 18:26:44 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-13 18:26:44 +0000 |
commit | 539166597f9998d93733b346e8cbcbf102496770 (patch) | |
tree | 8aaa7ae6f3574e2adb437ff37a4de4d58bce695c /test/functional/timelog_controller_test.rb | |
parent | 0e514b3144bfd8124947534afb886e9f197275a7 (diff) | |
download | redmine-539166597f9998d93733b346e8cbcbf102496770.tar.gz redmine-539166597f9998d93733b346e8cbcbf102496770.zip |
Adds a version filter on time entries (#13558).
git-svn-id: http://svn.redmine.org/redmine/trunk@15646 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/timelog_controller_test.rb')
-rw-r--r-- | test/functional/timelog_controller_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index 25bfea2fa..b85ee67be 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -639,6 +639,27 @@ class TimelogControllerTest < ActionController::TestCase end end + def test_index_at_project_level_with_issue_id_short_filter + issue = Issue.generate!(:project_id => 1) + TimeEntry.generate!(:issue => issue, :hours => 4) + TimeEntry.generate!(:issue => issue, :hours => 3) + @request.session[:user_id] = 2 + + get :index, :project_id => 'ecookbook', :issue_id => issue.id.to_s, :set_filter => 1 + assert_select '.total-hours', :text => 'Total time: 7.00 hours' + end + + def test_index_at_project_level_with_issue_fixed_version_id_short_filter + version = Version.generate!(:project_id => 1) + issue = Issue.generate!(:project_id => 1, :fixed_version => version) + TimeEntry.generate!(:issue => issue, :hours => 2) + TimeEntry.generate!(:issue => issue, :hours => 3) + @request.session[:user_id] = 2 + + get :index, :project_id => 'ecookbook', :"issue.fixed_version_id" => version.id.to_s, :set_filter => 1 + assert_select '.total-hours', :text => 'Total time: 5.00 hours' + end + def test_index_at_project_level_with_date_range get :index, :project_id => 'ecookbook', :f => ['spent_on'], |