summaryrefslogtreecommitdiffstats
path: root/test/unit/issue_nested_set_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-03-17 15:02:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-03-17 15:02:57 +0000
commit38b3e045cf221e8d1aad1ea7fd9e2a86ea0ff5f6 (patch)
tree374354c3d09066ec44a8bb8881a6bd5afc5e2bb1 /test/unit/issue_nested_set_test.rb
parentb1afd75620529f855a83bf1202c9dfb630258568 (diff)
downloadredmine-38b3e045cf221e8d1aad1ea7fd9e2a86ea0ff5f6.tar.gz
redmine-38b3e045cf221e8d1aad1ea7fd9e2a86ea0ff5f6.zip
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
Diffstat (limited to 'test/unit/issue_nested_set_test.rb')
-rw-r--r--test/unit/issue_nested_set_test.rb16
1 files changed, 0 insertions, 16 deletions
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!