diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-13 15:29:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-13 15:29:34 +0000 |
commit | d550c46160deb2b9bca12a75f315afdd18cfbdfa (patch) | |
tree | aaebe04473fbbe1fdd332fba29a0ad816c4ea6f5 /test/unit/issue_nested_set_test.rb | |
parent | 8e3d1b694ab47317638b474082cb70e08a8d02e7 (diff) | |
download | redmine-d550c46160deb2b9bca12a75f315afdd18cfbdfa.tar.gz redmine-d550c46160deb2b9bca12a75f315afdd18cfbdfa.zip |
Makes subtasks rescheduled when a 'precedes' relation is set on a parent task.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3574 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 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/issue_nested_set_test.rb b/test/unit/issue_nested_set_test.rb index d82a42d28..7138e4527 100644 --- a/test/unit/issue_nested_set_test.rb +++ b/test/unit/issue_nested_set_test.rb @@ -272,6 +272,21 @@ class IssueNestedSetTest < ActiveSupport::TestCase create_issue!(:estimated_hours => 7, :parent_issue_id => parent.id) assert_equal 12, parent.reload.estimated_hours end + + + def test_reschuling_a_parent_should_reschedule_subtasks + parent = create_issue! + c1 = create_issue!(:start_date => '2010-05-12', :due_date => '2010-05-18', :parent_issue_id => parent.id) + c2 = create_issue!(:start_date => '2010-06-03', :due_date => '2010-06-10', :parent_issue_id => parent.id) + parent.reload + parent.reschedule_after(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]) |