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

@ -235,7 +235,7 @@ class UserTest < Test::Rails::TestCase
def test_find_and_activate_deferred_todos_that_are_ready
assert_equal 1, @admin_user.deferred_todos.count
@admin_user.deferred_todos[0].show_from = Time.now - 5.seconds
@admin_user.deferred_todos[0].show_from = Time.now.utc - 5.seconds
@admin_user.deferred_todos[0].save
@admin_user.deferred_todos.reload
@admin_user.deferred_todos.find_and_activate_ready