mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
Fix due dates in recurring todo test
This commit is contained in:
parent
076208f804
commit
af32031002
1 changed files with 4 additions and 4 deletions
|
@ -156,10 +156,10 @@ class RecurringTodoTest < ActiveSupport::TestCase
|
|||
## Test: every year
|
||||
|
||||
# start from after june 8th 2008
|
||||
@yearly.start_from = Time.zone.local(2020,6,12)
|
||||
assert_equal Time.zone.local(2021,6,8), @yearly.get_due_date(nil) # jun 8th next year
|
||||
assert_equal Time.zone.local(2021,6,8), @yearly.get_due_date(Time.zone.local(2019,6,1)) # also next year
|
||||
assert_equal Time.zone.local(2021,6,8), @yearly.get_due_date(Time.zone.local(2020,6,15)) # also next year
|
||||
@yearly.start_from = Time.zone.local(2021,6,12)
|
||||
assert_equal Time.zone.local(2022,6,8), @yearly.get_due_date(nil) # jun 8th next year
|
||||
assert_equal Time.zone.local(2022,6,8), @yearly.get_due_date(Time.zone.local(2019,6,1)) # also next year
|
||||
assert_equal Time.zone.local(2022,6,8), @yearly.get_due_date(Time.zone.local(2020,6,15)) # also next year
|
||||
|
||||
this_year = Time.zone.now.utc.year
|
||||
@yearly.start_from = Time.zone.local(this_year+1,6,12)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue