X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2c7f2b117bdda7c4ad04af7621a6b39016475db6..918a382cad0cf9f8cbf2a47359d48773065c88f6:/test/controllers/changeset_controller_test.rb diff --git a/test/controllers/changeset_controller_test.rb b/test/controllers/changeset_controller_test.rb index 329be5be1..38d6ac162 100644 --- a/test/controllers/changeset_controller_test.rb +++ b/test/controllers/changeset_controller_test.rb @@ -580,8 +580,7 @@ CHANGESET assert_response :success, "Should be able to create a changeset: #{@response.body}" changeset_id = @response.body.to_i - # upload some widely-spaced nodes, spiralling positive and negative to cause - # largest bbox over-expansion possible. + # upload some widely-spaced nodes, spiralling positive and negative diff = < @@ -619,7 +618,7 @@ CHANGESET assert cs.min_lon >= -180 * GeoRecord::SCALE, "Minimum longitude (#{cs.min_lon / GeoRecord::SCALE}) should be >= -180 to be valid." assert cs.max_lon <= 180 * GeoRecord::SCALE, "Maximum longitude (#{cs.max_lon / GeoRecord::SCALE}) should be <= 180 to be valid." assert cs.min_lat >= -90 * GeoRecord::SCALE, "Minimum latitude (#{cs.min_lat / GeoRecord::SCALE}) should be >= -90 to be valid." - assert cs.max_lat >= 90 * GeoRecord::SCALE, "Maximum latitude (#{cs.max_lat / GeoRecord::SCALE}) should be <= 90 to be valid." + assert cs.max_lat <= 90 * GeoRecord::SCALE, "Maximum latitude (#{cs.max_lat / GeoRecord::SCALE}) should be <= 90 to be valid." end ## @@ -812,9 +811,7 @@ CHANGESET assert_equal 2, Node.find(new_node_id).tags.size, "new node should have two tags" assert_equal [new_node_id, node.id], Way.find(way.id).nds, "way nodes should match" Relation.find(relation.id).members.each do |type, id, _role| - if type == "node" - assert_equal new_node_id, id, "relation should contain new node" - end + assert_equal new_node_id, id, "relation should contain new node" if type == "node" end end @@ -1570,11 +1567,10 @@ CHANGESET # get the bounding box back from the changeset get :read, :params => { :id => changeset_id } assert_response :success, "Couldn't read back changeset for the third time." - # note that the 3.1 here is because of the bbox overexpansion assert_select "osm>changeset[min_lon='1.0000000']", 1 - assert_select "osm>changeset[max_lon='3.1000000']", 1 + assert_select "osm>changeset[max_lon='3.0000000']", 1 assert_select "osm>changeset[min_lat='1.0000000']", 1 - assert_select "osm>changeset[max_lat='3.1000000']", 1 + assert_select "osm>changeset[max_lat='3.0000000']", 1 end ##