summaryrefslogtreecommitdiffstats
path: root/test/unit/issue_subtasking_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-08-07 04:44:19 +0000
committerGo MAEDA <maeda@farend.jp>2019-08-07 04:44:19 +0000
commit8a9123de04569aaaf0f8a337eaa8dbfb7fddd005 (patch)
treed0bc442048cd84e3514911b772a318e62b380b4b /test/unit/issue_subtasking_test.rb
parentbe7d39a4d3c2f567f4cc315969d6a5c09221fb45 (diff)
downloadredmine-8a9123de04569aaaf0f8a337eaa8dbfb7fddd005.tar.gz
redmine-8a9123de04569aaaf0f8a337eaa8dbfb7fddd005.zip
Limit total_estimated_hours to visible issues (#31778).
Patch by Gregor Schmidt. git-svn-id: http://svn.redmine.org/redmine/trunk@18356 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_subtasking_test.rb')
-rw-r--r--test/unit/issue_subtasking_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/issue_subtasking_test.rb b/test/unit/issue_subtasking_test.rb
index f0a13e5f2..51d30d7e9 100644
--- a/test/unit/issue_subtasking_test.rb
+++ b/test/unit/issue_subtasking_test.rb
@@ -338,7 +338,7 @@ class IssueSubtaskingTest < ActiveSupport::TestCase
end
end
- def test_parent_total_estimated_hours_should_be_sum_of_descendants
+ def test_parent_total_estimated_hours_should_be_sum_of_visible_descendants
parent = Issue.generate!
parent.generate_child!(:estimated_hours => nil)
assert_equal 0, parent.reload.total_estimated_hours
@@ -346,6 +346,9 @@ class IssueSubtaskingTest < ActiveSupport::TestCase
assert_equal 5, parent.reload.total_estimated_hours
parent.generate_child!(:estimated_hours => 7)
assert_equal 12, parent.reload.total_estimated_hours
+
+ parent.generate_child!(:estimated_hours => 9, :is_private => true)
+ assert_equal 12, parent.reload.total_estimated_hours
end
def test_open_issue_with_closed_parent_should_not_validate