diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-25 09:53:05 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-25 09:53:05 +0000 |
commit | 0ad09e3aef86d4e6c6784d5d906bfa6d1767757f (patch) | |
tree | c626a05d630f6529294dbf6a8065f17a235f3256 /test/unit/issue_nested_set_test.rb | |
parent | 09b935b44ed897afc3f0abcc614558bf6356b6ba (diff) | |
download | redmine-0ad09e3aef86d4e6c6784d5d906bfa6d1767757f.tar.gz redmine-0ad09e3aef86d4e6c6784d5d906bfa6d1767757f.zip |
Adds settings to control start/due dates and priority on parent tasks (#5490).
git-svn-id: http://svn.redmine.org/redmine/trunk@14269 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_nested_set_test.rb')
-rw-r--r-- | test/unit/issue_nested_set_test.rb | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/test/unit/issue_nested_set_test.rb b/test/unit/issue_nested_set_test.rb index 6fb5b0045..632464872 100644 --- a/test/unit/issue_nested_set_test.rb +++ b/test/unit/issue_nested_set_test.rb @@ -287,35 +287,6 @@ class IssueNestedSetTest < ActiveSupport::TestCase end end - def test_parent_priority_should_be_the_highest_child_priority - parent = Issue.generate!(:priority => IssuePriority.find_by_name('Normal')) - # Create children - child1 = parent.generate_child!(:priority => IssuePriority.find_by_name('High')) - assert_equal 'High', parent.reload.priority.name - child2 = child1.generate_child!(:priority => IssuePriority.find_by_name('Immediate')) - assert_equal 'Immediate', child1.reload.priority.name - assert_equal 'Immediate', parent.reload.priority.name - child3 = parent.generate_child!(:priority => IssuePriority.find_by_name('Low')) - assert_equal 'Immediate', parent.reload.priority.name - # Destroy a child - child1.destroy - assert_equal 'Low', parent.reload.priority.name - # Update a child - child3.reload.priority = IssuePriority.find_by_name('Normal') - child3.save! - assert_equal 'Normal', parent.reload.priority.name - end - - def test_parent_dates_should_be_lowest_start_and_highest_due_dates - parent = Issue.generate! - parent.generate_child!(:start_date => '2010-01-25', :due_date => '2010-02-15') - parent.generate_child!( :due_date => '2010-02-13') - parent.generate_child!(:start_date => '2010-02-01', :due_date => '2010-02-22') - parent.reload - assert_equal Date.parse('2010-01-25'), parent.start_date - assert_equal Date.parse('2010-02-22'), parent.due_date - end - def test_parent_done_ratio_should_be_average_done_ratio_of_leaves parent = Issue.generate! parent.generate_child!(:done_ratio => 20) @@ -390,20 +361,6 @@ class IssueNestedSetTest < ActiveSupport::TestCase assert_nil first_parent.reload.estimated_hours end - def test_reschuling_a_parent_should_reschedule_subtasks - parent = Issue.generate! - c1 = parent.generate_child!(:start_date => '2010-05-12', :due_date => '2010-05-18') - c2 = parent.generate_child!(:start_date => '2010-06-03', :due_date => '2010-06-10') - parent.reload - parent.reschedule_on!(Date.parse('2010-06-02')) - c1.reload - assert_equal [Date.parse('2010-06-02'), Date.parse('2010-06-08')], [c1.start_date, c1.due_date] - c2.reload - assert_equal [Date.parse('2010-06-03'), Date.parse('2010-06-10')], [c2.start_date, c2.due_date] # no change - parent.reload - assert_equal [Date.parse('2010-06-02'), Date.parse('2010-06-10')], [parent.start_date, parent.due_date] - end - def test_project_copy_should_copy_issue_tree p = Project.create!(:name => 'Tree copy', :identifier => 'tree-copy', :tracker_ids => [1, 2]) i1 = Issue.generate!(:project => p, :subject => 'i1') |