mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 00:08:50 +01:00
fix corner case for yearly repeating todos
also adds test for this case
This commit is contained in:
parent
1118a582d7
commit
c64bbb9e60
2 changed files with 9 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue