diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-25 11:37:12 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-05-25 11:37:12 +0000 |
commit | 481f70d12537333206199b4a8d2891218959f4ad (patch) | |
tree | 901e580d30bbb87c2f43716574c29483f0dcac16 /test/unit/issue_nested_set_test.rb | |
parent | 4f8bf001302f6e3e4fabe33b86891ec6581e867b (diff) | |
download | redmine-481f70d12537333206199b4a8d2891218959f4ad.tar.gz redmine-481f70d12537333206199b4a8d2891218959f4ad.zip |
Don't store total estimated hours on parent issues (#16092).
Parent can now have its own estimate that is summed up with children estimates.
git-svn-id: http://svn.redmine.org/redmine/trunk@14272 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 | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/test/unit/issue_nested_set_test.rb b/test/unit/issue_nested_set_test.rb index 66bb2ba91..0c2631a27 100644 --- a/test/unit/issue_nested_set_test.rb +++ b/test/unit/issue_nested_set_test.rb @@ -287,26 +287,6 @@ class IssueNestedSetTest < ActiveSupport::TestCase end end - def test_parent_estimate_should_be_sum_of_leaves - parent = Issue.generate! - parent.generate_child!(:estimated_hours => nil) - assert_equal nil, parent.reload.estimated_hours - parent.generate_child!(:estimated_hours => 5) - assert_equal 5, parent.reload.estimated_hours - parent.generate_child!(:estimated_hours => 7) - assert_equal 12, parent.reload.estimated_hours - end - - def test_move_parent_updates_old_parent_attributes - first_parent = Issue.generate! - second_parent = Issue.generate! - child = first_parent.generate_child!(:estimated_hours => 5) - assert_equal 5, first_parent.reload.estimated_hours - child.update_attributes(:estimated_hours => 7, :parent_issue_id => second_parent.id) - assert_equal 7, second_parent.reload.estimated_hours - assert_nil first_parent.reload.estimated_hours - 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') |