code layout clean up of test_all_dependent_issues_with_persistent_circular_dependency at test/unit/issue_test.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7461 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-09-23 06:16:55 +00:00
parent 550bbe59c8
commit 7a2f8588ee
1 changed files with 9 additions and 3 deletions

View File

@ -840,10 +840,16 @@ class IssueTest < ActiveSupport::TestCase
def test_all_dependent_issues_with_persistent_circular_dependency
IssueRelation.delete_all
assert IssueRelation.create!(:issue_from => Issue.find(1), :issue_to => Issue.find(2), :relation_type => IssueRelation::TYPE_PRECEDES)
assert IssueRelation.create!(:issue_from => Issue.find(2), :issue_to => Issue.find(3), :relation_type => IssueRelation::TYPE_PRECEDES)
assert IssueRelation.create!(:issue_from => Issue.find(1),
:issue_to => Issue.find(2),
:relation_type => IssueRelation::TYPE_PRECEDES)
assert IssueRelation.create!(:issue_from => Issue.find(2),
:issue_to => Issue.find(3),
:relation_type => IssueRelation::TYPE_PRECEDES)
# Validation skipping
assert IssueRelation.new(:issue_from => Issue.find(3), :issue_to => Issue.find(1), :relation_type => IssueRelation::TYPE_PRECEDES).save(false)
assert IssueRelation.new(:issue_from => Issue.find(3),
:issue_to => Issue.find(1),
:relation_type => IssueRelation::TYPE_PRECEDES).save(false)
assert_equal [2, 3], Issue.find(1).all_dependent_issues.collect(&:id).sort
end