assert_response :success
# count one osm element
- assert_select "osm[version='#{Settings.api_version}'][generator='OpenStreetMap server']", 1
+ assert_select "osm[version='#{Settings.api_version}'][generator='#{Settings.generator}']", 1
# we should have only the expected number of relations
assert_select "osm>relation", expected_relations.size
##
# updates the relation (XML) +rel+ and
# yields the new version of that relation into the block.
- # the parsed XML doc is retured.
+ # the parsed XML doc is returned.
def with_update(rel, headers)
rel_id = rel.find("//osm/relation").first["id"].to_i
put api_relation_path(:id => rel_id), :params => rel.to_s, :headers => headers
##
# updates the relation (XML) +rel+ via the diff-upload API and
# yields the new version of that relation into the block.
- # the parsed XML doc is retured.
+ # the parsed XML doc is returned.
def with_update_diff(rel, headers)
rel_id = rel.find("//osm/relation").first["id"].to_i
cs_id = rel.find("//osm/relation").first["changeset"].to_i
version = nil
with_controller(Api::ChangesetsController.new) do
- doc = OSM::API.new.get_xml_doc
+ doc = OSM::API.new.xml_doc
change = XML::Node.new "osmChange"
doc.root = change
modify = XML::Node.new "modify"