X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ab3df6fc56a2a16c6af65ac429505d682153a60d..396f2e28dd27d514f7882c3918103b12764038de:/test/controllers/api_controller_test.rb diff --git a/test/controllers/api_controller_test.rb b/test/controllers/api_controller_test.rb index 61763d128..b07eb68c9 100644 --- a/test/controllers/api_controller_test.rb +++ b/test/controllers/api_controller_test.rb @@ -70,7 +70,7 @@ class ApiControllerTest < ActionController::TestCase end assert_response :success, "Expected scucess with the map call" assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']", :count => 1 do - assert_select "bounds[minlon='#{minlon}'][minlat='#{minlat}'][maxlon='#{maxlon}'][maxlat='#{maxlat}']", :count => 1 + assert_select "bounds[minlon='#{format('%.7f', minlon)}'][minlat='#{format('%.7f', minlat)}'][maxlon='#{format('%.7f', maxlon)}'][maxlat='#{format('%.7f', maxlat)}']", :count => 1 assert_select "node[id='#{node.id}'][lat='#{format('%.7f', node.lat)}'][lon='#{format('%.7f', 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='#{tag.k}'][v='#{tag.v}']" @@ -141,7 +141,7 @@ class ApiControllerTest < ActionController::TestCase get :map, :bbox => "179.998,89.998,179.999.1,89.999" assert_response :success, "The map call should have succeeded" assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']", :count => 1 do - assert_select "bounds[minlon='179.998'][minlat='89.998'][maxlon='179.999'][maxlat='89.999']", :count => 1 + assert_select "bounds[minlon='179.9980000'][minlat='89.9980000'][maxlon='179.9990000'][maxlat='89.9990000']", :count => 1 assert_select "node", :count => 0 assert_select "way", :count => 0 assert_select "relation", :count => 0