diff options
author | Go MAEDA <maeda@farend.jp> | 2019-01-22 08:23:53 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-01-22 08:23:53 +0000 |
commit | eda4b6514b3ec1977720bc9d59d436b2d09b4c0f (patch) | |
tree | 885966bf88ab5387ab8f906d49f63a60739c1c2e | |
parent | 61a365789fc0a387dcdacea4d13ecca6bcade5c5 (diff) | |
download | redmine-eda4b6514b3ec1977720bc9d59d436b2d09b4c0f.tar.gz redmine-eda4b6514b3ec1977720bc9d59d436b2d09b4c0f.zip |
IssuesControllerTest#test_index_sort_by_total_estimated_hours tests nothing (#30474).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17837 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/fixtures/issues.yml | 4 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/test/fixtures/issues.yml b/test/fixtures/issues.yml index 05d5bffee..1c2c37fa5 100644 --- a/test/fixtures/issues.yml +++ b/test/fixtures/issues.yml @@ -15,6 +15,7 @@ issues_001: status_id: 1 start_date: <%= 1.day.ago.to_date.to_s(:db) %> due_date: <%= 10.day.from_now.to_date.to_s(:db) %> + estimated_hours: 200.0 root_id: 1 lft: 1 rgt: 2 @@ -35,6 +36,7 @@ issues_002: status_id: 2 start_date: <%= 2.day.ago.to_date.to_s(:db) %> due_date: + estimated_hours: 0.5 root_id: 2 lft: 1 rgt: 2 @@ -56,6 +58,7 @@ issues_003: status_id: 1 start_date: <%= 15.day.ago.to_date.to_s(:db) %> due_date: <%= 5.day.ago.to_date.to_s(:db) %> + estimated_hours: 1.0 root_id: 3 lft: 1 rgt: 2 @@ -90,6 +93,7 @@ issues_005: assigned_to_id: author_id: 2 status_id: 1 + estimated_hours: 2.0 root_id: 5 lft: 1 rgt: 2 diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 08a2187ff..7e1d3e9bf 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1067,6 +1067,8 @@ class IssuesControllerTest < Redmine::ControllerTest } assert_response :success hours = issues_in_list.map(&:total_estimated_hours) + # Removes nil because the position of NULL is database dependent + hours.compact! assert_equal hours.sort.reverse, hours end |