fix corner case for yearly repeating todos

also adds test for this case
This commit is contained in:
Reinier Balt 2008-10-14 10:57:12 +02:00
parent 1118a582d7
commit c64bbb9e60
2 changed files with 9 additions and 5 deletions

View file

@ -174,6 +174,9 @@ class RecurringTodoTest < Test::Rails::TestCase
# same month, day after
due_date = @yearly.get_due_date(@monday) # june 9th
assert_equal Time.zone.local(2009,6,8), due_date # june 8th next year
# very overdue
due_date = @yearly.get_due_date(@monday+5.months-2.days) # november 7
assert_equal Time.zone.local(2009,6,8), due_date # june 8th next year
@yearly.recurrence_selector = 1
@yearly.every_other3 = 2 # second