code layout clean up test_rescheduling_an_issue_should_reschedule_following_issue of unit issue test

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10632 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-10-13 10:14:16 +00:00
parent 55dbd8886f
commit dd887891f7
1 changed files with 10 additions and 3 deletions

View File

@ -1188,9 +1188,16 @@ class IssueTest < ActiveSupport::TestCase
end
def test_rescheduling_an_issue_should_reschedule_following_issue
issue1 = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :subject => '-', :start_date => Date.today, :due_date => Date.today + 2)
issue2 = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 1, :status_id => 1, :subject => '-', :start_date => Date.today, :due_date => Date.today + 2)
IssueRelation.create!(:issue_from => issue1, :issue_to => issue2, :relation_type => IssueRelation::TYPE_PRECEDES)
issue1 = Issue.create!(:project_id => 1, :tracker_id => 1,
:author_id => 1, :status_id => 1,
:subject => '-',
:start_date => Date.today, :due_date => Date.today + 2)
issue2 = Issue.create!(:project_id => 1, :tracker_id => 1,
:author_id => 1, :status_id => 1,
:subject => '-',
:start_date => Date.today, :due_date => Date.today + 2)
IssueRelation.create!(:issue_from => issue1, :issue_to => issue2,
:relation_type => IssueRelation::TYPE_PRECEDES)
assert_equal issue1.due_date + 1, issue2.reload.start_date
issue1.due_date = Date.today + 5