move recurrence text helpers into patterns. move next_date calculation into

respective models
This commit is contained in:
Reinier Balt 2014-02-27 16:01:01 +01:00
parent d8507bf8b7
commit b84adfc172
13 changed files with 291 additions and 289 deletions

View file

@ -32,6 +32,17 @@ module RecurringTodos
assert rt.valid?, "should be valid again"
end
def test_pattern_text
@every_day = recurring_todos(:call_bill_gates_every_day)
@every_workday = recurring_todos(:call_bill_gates_every_workday)
assert_equal "every day", @every_day.recurrence_pattern
assert_equal "on work days", @every_workday.recurrence_pattern
@every_day.every_other1 = 2
assert_equal "every 2 days", @every_day.recurrence_pattern
end
end
end