diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-10-13 10:15:08 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-10-13 10:15:08 +0000 |
commit | 0bcc6115c3f3d9657a046ceba18e6d1dccc0eeb1 (patch) | |
tree | d70c44dc38d86ab18130bb16d123a5b0ae6a3936 /test/unit | |
parent | be79553f33db146b2fb250188314b09e3bdc4f34 (diff) | |
download | redmine-0bcc6115c3f3d9657a046ceba18e6d1dccc0eeb1.tar.gz redmine-0bcc6115c3f3d9657a046ceba18e6d1dccc0eeb1.zip |
code layout clean up context "#behind_schedule?" of unit issue test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10634 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/issue_test.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 6d48f5e90..6e0c5b4ae 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -1231,23 +1231,33 @@ class IssueTest < ActiveSupport::TestCase context "#behind_schedule?" do should "be false if the issue has no start_date" do - assert !Issue.new(:start_date => nil, :due_date => 1.day.from_now.to_date, :done_ratio => 0).behind_schedule? + assert !Issue.new(:start_date => nil, + :due_date => 1.day.from_now.to_date, + :done_ratio => 0).behind_schedule? end should "be false if the issue has no end_date" do - assert !Issue.new(:start_date => 1.day.from_now.to_date, :due_date => nil, :done_ratio => 0).behind_schedule? + assert !Issue.new(:start_date => 1.day.from_now.to_date, + :due_date => nil, + :done_ratio => 0).behind_schedule? end should "be false if the issue has more done than it's calendar time" do - assert !Issue.new(:start_date => 50.days.ago.to_date, :due_date => 50.days.from_now.to_date, :done_ratio => 90).behind_schedule? + assert !Issue.new(:start_date => 50.days.ago.to_date, + :due_date => 50.days.from_now.to_date, + :done_ratio => 90).behind_schedule? end should "be true if the issue hasn't been started at all" do - assert Issue.new(:start_date => 1.day.ago.to_date, :due_date => 1.day.from_now.to_date, :done_ratio => 0).behind_schedule? + assert Issue.new(:start_date => 1.day.ago.to_date, + :due_date => 1.day.from_now.to_date, + :done_ratio => 0).behind_schedule? end should "be true if the issue has used more calendar time than it's done ratio" do - assert Issue.new(:start_date => 100.days.ago.to_date, :due_date => Date.today, :done_ratio => 90).behind_schedule? + assert Issue.new(:start_date => 100.days.ago.to_date, + :due_date => Date.today, + :done_ratio => 90).behind_schedule? end end |