Defect #23511 » 0001-test-case-for-grandchildren-s-done-percentages.patch
| test/unit/issue_subtasking_test.rb | ||
|---|---|---|
| 143 | 143 |
end |
| 144 | 144 |
end |
| 145 | 145 | |
| 146 |
def test_parent_done_ratio_should_be_weighted_by_estimated_times_if_any_with_grandchildren |
|
| 147 |
with_settings :parent_issue_done_ratio => 'derived' do |
|
| 148 |
parent = Issue.generate! |
|
| 149 |
parent.generate_child!(:estimated_hours => 2, :done_ratio => 0) |
|
| 150 |
child = parent.generate_child! |
|
| 151 |
child.generate_child!(:estimated_hours => 2, :done_ratio => 50) |
|
| 152 |
child.generate_child!(:estimated_hours => 2, :done_ratio => 50) |
|
| 153 |
assert_equal 50, child.reload.done_ratio |
|
| 154 |
assert_equal 33, parent.reload.done_ratio |
|
| 155 |
end |
|
| 156 |
end |
|
| 157 | ||
| 146 | 158 |
def test_parent_done_ratio_with_child_estimate_to_0_should_reach_100 |
| 147 | 159 |
with_settings :parent_issue_done_ratio => 'derived' do |
| 148 | 160 |
parent = Issue.generate! |