mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-06 01:08:50 +01:00
fix bug introduced by last commit and add test for it
also refactor check_for_next_todo a bit to depend less on globals
This commit is contained in:
parent
1a2cdc7585
commit
ce671f23f4
8 changed files with 99 additions and 36 deletions
|
|
@ -79,6 +79,11 @@ class RecurringTodosControllerTest < ActionController::TestCase
|
|||
recurring_todo_1 = RecurringTodo.find(1)
|
||||
assert recurring_todo_1.completed?
|
||||
|
||||
# remove remaining todo
|
||||
todo = Todo.find_by_recurring_todo_id(1)
|
||||
todo.recurring_todo_id = 2
|
||||
todo.save
|
||||
|
||||
todo_count = Todo.count
|
||||
|
||||
# mark as active
|
||||
|
|
@ -119,5 +124,5 @@ class RecurringTodosControllerTest < ActionController::TestCase
|
|||
# show_from should be nil since now+4.days-10.days is in the past
|
||||
assert_equal nil, new_todo.show_from
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue