diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-07-05 12:16:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-07-05 12:16:56 +0000 |
commit | f6ea714f52ae94d798ae1f4d47605942e00f790b (patch) | |
tree | ed6c484f6a6a996969050a6bca56f74d5d570512 /test | |
parent | 71942ec5a2b5bccc44c95d22a467e8c5a6be3d98 (diff) | |
download | redmine-f6ea714f52ae94d798ae1f4d47605942e00f790b.tar.gz redmine-f6ea714f52ae94d798ae1f4d47605942e00f790b.zip |
Adds "Total spent hours" column available on the issue list (#11253).
git-svn-id: http://svn.redmine.org/redmine/trunk@14406 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 095860703..6d106e88b 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -714,6 +714,13 @@ class IssuesControllerTest < ActionController::TestCase hours = assigns(:issues).collect(&:spent_hours) assert_equal hours.sort.reverse, hours end + + def test_index_sort_by_total_spent_hours + get :index, :sort => 'total_spent_hours:desc' + assert_response :success + hours = assigns(:issues).collect(&:total_spent_hours) + assert_equal hours.sort.reverse, hours + end def test_index_sort_by_user_custom_field cf = IssueCustomField.create!(:name => 'User', :is_for_all => true, :tracker_ids => [1,2,3], :field_format => 'user') @@ -848,6 +855,11 @@ class IssuesControllerTest < ActionController::TestCase assert_select 'table.issues tr#issue-3 td.spent_hours', :text => '1.00' end + def test_index_with_total_spent_hours_column + get :index, :set_filter => 1, :c => %w(subject total_spent_hours) + assert_select 'table.issues tr#issue-3 td.total_spent_hours', :text => '1.00' + end + def test_index_should_not_show_spent_hours_column_without_permission Role.anonymous.remove_permission! :view_time_entries get :index, :set_filter => 1, :c => %w(subject spent_hours) |