Fixed a latent time zone bug in tests.

I created a new method accessible to all tests for forcing a user to the local time zone. The code was cribbed from Rails's rake tasks time:zones:local.
This commit is contained in:
Eric Allen 2009-10-13 23:39:36 -04:00
parent fe52c0ab3c
commit 00da0b36aa
2 changed files with 18 additions and 2 deletions

View file

@ -426,6 +426,7 @@ class TodosControllerTest < ActionController::TestCase
# link todo_1 and recurring_todo_1
recurring_todo_1 = RecurringTodo.find(1)
set_user_to_current_time_zone(recurring_todo_1.user)
todo_1 = Todo.find_by_recurring_todo_id(1)
today = Time.now.at_midnight