mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-23 17:26:11 +01:00
move recurrence text helpers into patterns. move next_date calculation into
respective models
This commit is contained in:
parent
d8507bf8b7
commit
b84adfc172
13 changed files with 291 additions and 289 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue