From 38b3e045cf221e8d1aad1ea7fd9e2a86ea0ff5f6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 17 Mar 2013 15:02:57 +0000 Subject: Fixed: Circular loop when using relations and subtasks (#8794). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11641 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_nested_set_test.rb | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'test/unit/issue_nested_set_test.rb') diff --git a/test/unit/issue_nested_set_test.rb b/test/unit/issue_nested_set_test.rb index dc0c3d3aa..c3120e82a 100644 --- a/test/unit/issue_nested_set_test.rb +++ b/test/unit/issue_nested_set_test.rb @@ -166,22 +166,6 @@ class IssueNestedSetTest < ActiveSupport::TestCase assert_not_nil child.errors[:parent_issue_id] end - def test_moving_an_issue_should_keep_valid_relations_only - issue1 = Issue.generate! - issue2 = Issue.generate! - issue3 = Issue.generate!(:parent_issue_id => issue2.id) - issue4 = Issue.generate! - r1 = IssueRelation.create!(:issue_from => issue1, :issue_to => issue2, :relation_type => IssueRelation::TYPE_PRECEDES) - r2 = IssueRelation.create!(:issue_from => issue1, :issue_to => issue3, :relation_type => IssueRelation::TYPE_PRECEDES) - r3 = IssueRelation.create!(:issue_from => issue2, :issue_to => issue4, :relation_type => IssueRelation::TYPE_PRECEDES) - issue2.reload - issue2.parent_issue_id = issue1.id - issue2.save! - assert !IssueRelation.exists?(r1.id) - assert !IssueRelation.exists?(r2.id) - assert IssueRelation.exists?(r3.id) - end - def test_destroy_should_destroy_children issue1 = Issue.generate! issue2 = Issue.generate! -- cgit v1.2.3