Avoid using Time.parse as it is affected by the TZ variable
authorTom Hughes <tom@compton.nu>
Thu, 16 Apr 2015 14:46:47 +0000 (15:46 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 16 Apr 2015 14:46:47 +0000 (15:46 +0100)
test/controllers/api_controller_test.rb

index 178eecc6542c8cdebd67f034fdabadf99943e020..d10e5277e74da23ccc298f891568ccab134dba0b 100644 (file)
@@ -269,7 +269,7 @@ class ApiControllerTest < ActionController::TestCase
   # http://wiki.openstreetmap.org/wiki/Rails#Installing_the_quadtile_functions
   # or by looking at the readme in db/README
   def test_changes_simple
-    Timecop.freeze(Time.parse("2010-04-03 10:55:00"))
+    Timecop.freeze(Time.utc(2010, 4, 3, 10, 55, 0))
     get :changes
     assert_response :success
     # print @response.body
@@ -284,7 +284,7 @@ class ApiControllerTest < ActionController::TestCase
     end
     Timecop.return
 
-    Timecop.freeze(Time.parse("2007-01-01 00:30:00"))
+    Timecop.freeze(Time.utc(2007, 1, 1, 0, 30, 0))
     get :changes
     assert_response :success
     # print @response.body