]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/relations_controller_test.rb
Merge remote-tracking branch 'upstream/pull/3710'
[rails.git] / test / controllers / api / relations_controller_test.rb
index de24c087de1b8bf3babfb3f4d6e564637c7ca12a..eb8f8e02256eb5c3d8e97341a2f2758316199ba6 100644 (file)
@@ -245,7 +245,7 @@ module Api
       # create an relation with a node as member, this time test that we don't
       # need a role attribute to be included
       xml = "<osm><relation changeset='#{private_changeset.id}'>" \
-            "<member  ref='#{node.id}' type='node'/>" + "<tag k='test' v='yes' /></relation></osm>"
+            "<member  ref='#{node.id}' type='node'/><tag k='test' v='yes' /></relation></osm>"
       put relation_create_path, :params => xml, :headers => auth_header
       # hope for forbidden due to user
       assert_response :forbidden,
@@ -322,7 +322,7 @@ module Api
       # create an relation with a node as member, this time test that we don't
       # need a role attribute to be included
       xml = "<osm><relation changeset='#{changeset.id}'>" \
-            "<member  ref='#{node.id}' type='node'/>" + "<tag k='test' v='yes' /></relation></osm>"
+            "<member  ref='#{node.id}' type='node'/><tag k='test' v='yes' /></relation></osm>"
       put relation_create_path, :params => xml, :headers => auth_header
       # hope for success
       assert_response :success,
@@ -1009,7 +1009,7 @@ module Api
     ##
     # 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
@@ -1029,14 +1029,14 @@ module Api
     ##
     # 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"