]> 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 6a0c2e2ace32db5b599b8bbce63483b81eaf7f29..32f19265a01a7fa01dcddd6b1ad2003bbc8feddb 100644 (file)
@@ -45,7 +45,7 @@ class ApiControllerTest < ActionController::TestCase
       assert_select "bounds[minlon=#{minlon}][minlat=#{minlat}][maxlon=#{maxlon}][maxlat=#{maxlat}]", :count => 1
       assert_select "node[id=#{node.id}][lat=#{node.lat}][lon=#{node.lon}][version=#{node.version}][changeset=#{node.changeset_id}][visible=#{node.visible}][timestamp=#{node.timestamp.xmlschema}]", :count => 1 do
         # This should really be more generic
-        assert_select "tag[k=test][v=1]"
+        assert_select "tag[k='test'][v='yes']"
       end
       # Should also test for the ways and relation
     end
@@ -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
-    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
@@ -181,7 +181,7 @@ class ApiControllerTest < ActionController::TestCase
     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