mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-28 12:58:48 +01:00
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:
parent
f52a2eafa8
commit
3647d79587
10 changed files with 60 additions and 60 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue