]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/api_controller_test.rb
Merge 14059:14394 from trunk.
[rails.git] / test / functional / api_controller_test.rb
index a8e8087166cb3bbf975a5dffab51717ed98b8d38..32f19265a01a7fa01dcddd6b1ad2003bbc8feddb 100644 (file)
@@ -160,7 +160,7 @@ class ApiControllerTest < ActionController::TestCase
     #print @response.body
     # As we have loaded the fixtures, we can assume that there are no 
     # changes recently
     #print @response.body
     # As we have loaded the fixtures, we can assume that there are no 
     # changes recently
-    now = Time.now
+    now = Time.now.getutc
     hourago = now - 1.hour
     # Note that this may fail on a very slow machine, so isn't a great test
     assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']:root", :count => 1 do
     hourago = now - 1.hour
     # Note that this may fail on a very slow machine, so isn't a great test
     assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']:root", :count => 1 do
@@ -181,7 +181,7 @@ class ApiControllerTest < ActionController::TestCase
     1.upto(16) do |zoom|
       get :changes, :zoom => zoom
       assert_response :success
     1.upto(16) do |zoom|
       get :changes, :zoom => zoom
       assert_response :success
-      now = Time.now
+      now = Time.now.getutc
       hourago = now - 1.hour
       # Note that this may fail on a very slow machine, so isn't a great test
       assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']:root", :count => 1 do
       hourago = now - 1.hour
       # Note that this may fail on a very slow machine, so isn't a great test
       assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']:root", :count => 1 do