end
pt.find('nd').each do |nd|
- way.add_nd_num(nd['id'])
+ way.add_nd_num(nd['ref'])
end
end
rescue
ordered_nodes.each do |nd_id|
if nd_id and nd_id != '0'
e = XML::Node.new 'nd'
- e['id'] = nd_id
+ e['ref'] = nd_id
el1 << e
end
end
basic_authorization "test@openstreetmap.org", "test"
# create a way with pre-existing nodes
- content "<osm><way><nd id='#{nid1}'/><nd id='#{nid2}'/><tag k='test' v='yes' /></way></osm>"
+ content "<osm><way><nd ref='#{nid1}'/><nd ref='#{nid2}'/><tag k='test' v='yes' /></way></osm>"
put :create
# hope for success
assert_response :success,
basic_authorization "test@openstreetmap.org", "test"
# create a way with non-existing node
- content "<osm><way><nd id='0'/><tag k='test' v='yes' /></way></osm>"
+ content "<osm><way><nd ref='0'/><tag k='test' v='yes' /></way></osm>"
put :create
# expect failure
assert_response :precondition_failed,