diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/issue_nested_set_test.rb | 20 | ||||
-rw-r--r-- | test/unit/issue_subtasking_test.rb | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/test/unit/issue_nested_set_test.rb b/test/unit/issue_nested_set_test.rb index 3404163ad..66bb2ba91 100644 --- a/test/unit/issue_nested_set_test.rb +++ b/test/unit/issue_nested_set_test.rb @@ -297,26 +297,6 @@ class IssueNestedSetTest < ActiveSupport::TestCase assert_equal 12, parent.reload.estimated_hours end - def test_done_ratio_of_parent_with_a_child_without_estimated_time_should_not_exceed_100 - parent = Issue.generate! - parent.generate_child!(:estimated_hours => 40) - parent.generate_child!(:estimated_hours => 40) - parent.generate_child!(:estimated_hours => 20) - parent.generate_child! - parent.reload.children.each(&:close!) - assert_equal 100, parent.reload.done_ratio - end - - def test_done_ratio_of_parent_with_a_child_with_estimated_time_at_0_should_not_exceed_100 - parent = Issue.generate! - parent.generate_child!(:estimated_hours => 40) - parent.generate_child!(:estimated_hours => 40) - parent.generate_child!(:estimated_hours => 20) - parent.generate_child!(:estimated_hours => 0) - parent.reload.children.each(&:close!) - assert_equal 100, parent.reload.done_ratio - end - def test_move_parent_updates_old_parent_attributes first_parent = Issue.generate! second_parent = Issue.generate! diff --git a/test/unit/issue_subtasking_test.rb b/test/unit/issue_subtasking_test.rb index 9005ac10e..d9f9a0824 100644 --- a/test/unit/issue_subtasking_test.rb +++ b/test/unit/issue_subtasking_test.rb @@ -145,6 +145,26 @@ class IssueSubtaskingTest < ActiveSupport::TestCase end end + def test_done_ratio_of_parent_with_a_child_without_estimated_time_should_not_exceed_100 + parent = Issue.generate! + parent.generate_child!(:estimated_hours => 40) + parent.generate_child!(:estimated_hours => 40) + parent.generate_child!(:estimated_hours => 20) + parent.generate_child! + parent.reload.children.each(&:close!) + assert_equal 100, parent.reload.done_ratio + end + + def test_done_ratio_of_parent_with_a_child_with_estimated_time_at_0_should_not_exceed_100 + parent = Issue.generate! + parent.generate_child!(:estimated_hours => 40) + parent.generate_child!(:estimated_hours => 40) + parent.generate_child!(:estimated_hours => 20) + parent.generate_child!(:estimated_hours => 0) + parent.reload.children.each(&:close!) + assert_equal 100, parent.reload.done_ratio + end + def test_parent_dates_should_be_editable_with_parent_issue_dates_set_to_independent with_settings :parent_issue_dates => 'independent' do issue = Issue.generate_with_child! |