way.nodes.each do |n|
count = (way.nodes - (way.nodes - [n])).length
assert_select "osm way nd[ref='#{n.id}']", count
way.nodes.each do |n|
count = (way.nodes - (way.nodes - [n])).length
assert_select "osm way nd[ref='#{n.id}']", count
- assert_select "osm node[id='#{n.id}'][version='#{n.version}'][lat='#{n.lat}'][lon='#{n.lon}']", 1
+ assert_select "osm node[id='#{n.id}'][version='#{n.version}'][lat='#{format('%.7f', n.lat)}'][lon='#{format('%.7f', n.lon)}']", 1
put :update, :id => current_ways(:visible_way).id
assert_response :bad_request,
"adding a duplicate tag to a way should fail with 'bad request'"
put :update, :id => current_ways(:visible_way).id
assert_response :bad_request,
"adding a duplicate tag to a way should fail with 'bad request'"
# check that the set of IDs match expectations
expected_way_ids = [current_ways(:visible_way).id,
# check that the set of IDs match expectations
expected_way_ids = [current_ways(:visible_way).id,
found_way_ids = ways_xml.find("//osm/way").collect { |w| w["id"].to_i }
assert_equal expected_way_ids.sort, found_way_ids.sort,
"expected ways for node #{current_nodes(:used_node_1).id} did not match found"
found_way_ids = ways_xml.find("//osm/way").collect { |w| w["id"].to_i }
assert_equal expected_way_ids.sort, found_way_ids.sort,
"expected ways for node #{current_nodes(:used_node_1).id} did not match found"