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:
Reinier Balt 2008-10-14 22:49:17 +02:00
parent 1a2cdc7585
commit ce671f23f4
8 changed files with 99 additions and 36 deletions

View file

@ -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