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

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7478 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-09-23 12:00:54 +00:00
parent 3a7c4a0417
commit 1d4cf3ecb6
1 changed files with 9 additions and 3 deletions

View File

@ -845,9 +845,15 @@ class IssueTest < ActiveSupport::TestCase
def test_all_dependent_issues
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(3), :issue_to => Issue.find(8), :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)
assert IssueRelation.create!(:issue_from => Issue.find(3),
:issue_to => Issue.find(8),
:relation_type => IssueRelation::TYPE_PRECEDES)
assert_equal [2, 3, 8], Issue.find(1).all_dependent_issues.collect(&:id).sort
end