From 4f8bf001302f6e3e4fabe33b86891ec6581e867b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 25 May 2015 10:05:07 +0000 Subject: Moved tests to issue_subtasking_test. git-svn-id: http://svn.redmine.org/redmine/trunk@14271 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_nested_set_test.rb | 20 -------------------- test/unit/issue_subtasking_test.rb | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'test') 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! -- cgit v1.2.3