summaryrefslogtreecommitdiffstats
path: root/test/functional/issues_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-09-12 12:47:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-09-12 12:47:21 +0000
commit59e4b268afbfd41c7739ba7860d1ae13d8b64d12 (patch)
treee94d3d758d232463ebd4dec544bb97570f2c99fb /test/functional/issues_controller_test.rb
parentde9b8e7ef4004c6e7925be5ca9c9c5e1016e5146 (diff)
downloadredmine-59e4b268afbfd41c7739ba7860d1ae13d8b64d12.tar.gz
redmine-59e4b268afbfd41c7739ba7860d1ae13d8b64d12.zip
Adds a Total estimated hours column on issue list (#20688).
git-svn-id: http://svn.redmine.org/redmine/trunk@14554 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issues_controller_test.rb')
-rw-r--r--test/functional/issues_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 4aa89c64e..a69b85630 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -721,6 +721,13 @@ class IssuesControllerTest < ActionController::TestCase
hours = assigns(:issues).collect(&:total_spent_hours)
assert_equal hours.sort.reverse, hours
end
+
+ def test_index_sort_by_total_estimated_hours
+ get :index, :sort => 'total_estimated_hours:desc'
+ assert_response :success
+ hours = assigns(:issues).collect(&:total_estimated_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')
@@ -862,6 +869,11 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'table.issues tr#issue-3 td.total_spent_hours', :text => '1.00'
end
+ def test_index_with_total_estimated_hours_column
+ get :index, :set_filter => 1, :c => %w(subject total_estimated_hours)
+ assert_select 'table.issues td.total_estimated_hours'
+ 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)