mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-06 23:51:31 +00:00
Moved tests to issue_subtasking_test.
git-svn-id: http://svn.redmine.org/redmine/trunk@14271 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b22105f34a
commit
4f8bf00130
@ -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!
|
||||
|
||||
@ -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!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user