fix #1270. if start-from fits the recurrence pattern, the first todo should use the start-from date

this is use-case 2 mentioned in the ticket.
This commit is contained in:
Reinier Balt 2013-06-11 23:38:30 +02:00
parent 3a2af7caf2
commit 56b884055f
4 changed files with 53 additions and 5 deletions

View file

@ -175,6 +175,9 @@ class RecurringTodoTest < ActiveSupport::TestCase
assert_equal @sunday, due_date # june 8th
due_date = @monthly.get_due_date(@sunday) # june 8th
assert_equal Time.zone.local(2008,6,8), due_date # june 8th
due_date = @monthly.get_due_date(@monday) # june 9th
assert_equal Time.zone.local(2008,8,8), due_date # aug 8th
end