From 0bcc6115c3f3d9657a046ceba18e6d1dccc0eeb1 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 13 Oct 2012 10:15:08 +0000 Subject: [PATCH] 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 --- test/unit/issue_test.rb | 20 +++++++++++++++----- 1 file 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 -- 2.39.5