##// END OF EJS Templates
Moved tests to issue_subtasking_test....
Jean-Philippe Lang -
r13889:4f8bf001302f
parent child
Show More
@@ -297,26 +297,6 class IssueNestedSetTest < ActiveSupport::TestCase
297 assert_equal 12, parent.reload.estimated_hours
297 assert_equal 12, parent.reload.estimated_hours
298 end
298 end
299
299
300 def test_done_ratio_of_parent_with_a_child_without_estimated_time_should_not_exceed_100
301 parent = Issue.generate!
302 parent.generate_child!(:estimated_hours => 40)
303 parent.generate_child!(:estimated_hours => 40)
304 parent.generate_child!(:estimated_hours => 20)
305 parent.generate_child!
306 parent.reload.children.each(&:close!)
307 assert_equal 100, parent.reload.done_ratio
308 end
309
310 def test_done_ratio_of_parent_with_a_child_with_estimated_time_at_0_should_not_exceed_100
311 parent = Issue.generate!
312 parent.generate_child!(:estimated_hours => 40)
313 parent.generate_child!(:estimated_hours => 40)
314 parent.generate_child!(:estimated_hours => 20)
315 parent.generate_child!(:estimated_hours => 0)
316 parent.reload.children.each(&:close!)
317 assert_equal 100, parent.reload.done_ratio
318 end
319
320 def test_move_parent_updates_old_parent_attributes
300 def test_move_parent_updates_old_parent_attributes
321 first_parent = Issue.generate!
301 first_parent = Issue.generate!
322 second_parent = Issue.generate!
302 second_parent = Issue.generate!
@@ -145,6 +145,26 class IssueSubtaskingTest < ActiveSupport::TestCase
145 end
145 end
146 end
146 end
147
147
148 def test_done_ratio_of_parent_with_a_child_without_estimated_time_should_not_exceed_100
149 parent = Issue.generate!
150 parent.generate_child!(:estimated_hours => 40)
151 parent.generate_child!(:estimated_hours => 40)
152 parent.generate_child!(:estimated_hours => 20)
153 parent.generate_child!
154 parent.reload.children.each(&:close!)
155 assert_equal 100, parent.reload.done_ratio
156 end
157
158 def test_done_ratio_of_parent_with_a_child_with_estimated_time_at_0_should_not_exceed_100
159 parent = Issue.generate!
160 parent.generate_child!(:estimated_hours => 40)
161 parent.generate_child!(:estimated_hours => 40)
162 parent.generate_child!(:estimated_hours => 20)
163 parent.generate_child!(:estimated_hours => 0)
164 parent.reload.children.each(&:close!)
165 assert_equal 100, parent.reload.done_ratio
166 end
167
148 def test_parent_dates_should_be_editable_with_parent_issue_dates_set_to_independent
168 def test_parent_dates_should_be_editable_with_parent_issue_dates_set_to_independent
149 with_settings :parent_issue_dates => 'independent' do
169 with_settings :parent_issue_dates => 'independent' do
150 issue = Issue.generate_with_child!
170 issue = Issue.generate_with_child!
General Comments 0
You need to be logged in to leave comments. Login now