From 6f82dd0fd3026265d2b92705d2f85613344265b9 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Mon, 2 Mar 2009 14:58:22 +0100 Subject: [PATCH] fix failing test. This was not due to a bug in tracks but a bug in the test --- test/functional/todos_controller_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/functional/todos_controller_test.rb b/test/functional/todos_controller_test.rb index 0e21f83c..d6d2fa0c 100644 --- a/test/functional/todos_controller_test.rb +++ b/test/functional/todos_controller_test.rb @@ -470,7 +470,11 @@ class TodosControllerTest < Test::Rails::TestCase # check that the new_todo is in the tickler to show next month assert !new_todo.show_from.nil? - assert_equal Time.utc(today.year, today.month, today.day)+1.month, new_todo.show_from + + # use Time.zone.local and not today+1.month because the latter messes up + # the timezone. + next_month = Time.zone.local(today.year, today.month+1, today.day) + assert_equal next_month.to_s(:db), new_todo.show_from.to_s(:db) end def test_check_for_next_todo