Overhaul of Time.now stuff because Time.now is unaware of time zones. Need to use Time.zone.now (Time.now.utc works fine when dealing with the database, since it is *always* in UTC)

This commit is contained in:
Eric Allen 2008-09-21 18:03:35 -07:00
parent f52a2eafa8
commit 3647d79587
10 changed files with 60 additions and 60 deletions

View file

@ -114,7 +114,7 @@ class RecurringTodosControllerTest < ActionController::TestCase
new_todo = Todo.find_by_recurring_todo_id 5
# due date should be the target_date
assert_equal Time.utc(target_date.year, target_date.month, target_date.day), new_todo.due
assert_equal users(:admin_user).at_midnight(Date.new(target_date.year, target_date.month, target_date.day)), new_todo.due
# show_from should be nil since now+4.days-10.days is in the past
assert_equal nil, new_todo.show_from