@@ -1231,23 +1231,33 class IssueTest < ActiveSupport::TestCase | |||||
1231 |
|
1231 | |||
1232 | context "#behind_schedule?" do |
|
1232 | context "#behind_schedule?" do | |
1233 | should "be false if the issue has no start_date" do |
|
1233 | should "be false if the issue has no start_date" do | |
1234 | assert !Issue.new(:start_date => nil, :due_date => 1.day.from_now.to_date, :done_ratio => 0).behind_schedule? |
|
1234 | assert !Issue.new(:start_date => nil, | |
|
1235 | :due_date => 1.day.from_now.to_date, | |||
|
1236 | :done_ratio => 0).behind_schedule? | |||
1235 | end |
|
1237 | end | |
1236 |
|
1238 | |||
1237 | should "be false if the issue has no end_date" do |
|
1239 | should "be false if the issue has no end_date" do | |
1238 |
assert !Issue.new(:start_date => 1.day.from_now.to_date, |
|
1240 | assert !Issue.new(:start_date => 1.day.from_now.to_date, | |
|
1241 | :due_date => nil, | |||
|
1242 | :done_ratio => 0).behind_schedule? | |||
1239 | end |
|
1243 | end | |
1240 |
|
1244 | |||
1241 | should "be false if the issue has more done than it's calendar time" do |
|
1245 | should "be false if the issue has more done than it's calendar time" do | |
1242 |
assert !Issue.new(:start_date => 50.days.ago.to_date, |
|
1246 | assert !Issue.new(:start_date => 50.days.ago.to_date, | |
|
1247 | :due_date => 50.days.from_now.to_date, | |||
|
1248 | :done_ratio => 90).behind_schedule? | |||
1243 | end |
|
1249 | end | |
1244 |
|
1250 | |||
1245 | should "be true if the issue hasn't been started at all" do |
|
1251 | should "be true if the issue hasn't been started at all" do | |
1246 |
assert Issue.new(:start_date => 1.day.ago.to_date, |
|
1252 | assert Issue.new(:start_date => 1.day.ago.to_date, | |
|
1253 | :due_date => 1.day.from_now.to_date, | |||
|
1254 | :done_ratio => 0).behind_schedule? | |||
1247 | end |
|
1255 | end | |
1248 |
|
1256 | |||
1249 | should "be true if the issue has used more calendar time than it's done ratio" do |
|
1257 | should "be true if the issue has used more calendar time than it's done ratio" do | |
1250 |
assert Issue.new(:start_date => 100.days.ago.to_date, |
|
1258 | assert Issue.new(:start_date => 100.days.ago.to_date, | |
|
1259 | :due_date => Date.today, | |||
|
1260 | :done_ratio => 90).behind_schedule? | |||
1251 | end |
|
1261 | end | |
1252 | end |
|
1262 | end | |
1253 |
|
1263 |
General Comments 0
You need to be logged in to leave comments.
Login now