mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Adds a version filter on time entries (#13558).
git-svn-id: http://svn.redmine.org/redmine/trunk@15646 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user