]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/changesets_controller_test.rb
Remove ignoring of nearby column
[rails.git] / test / controllers / api / changesets_controller_test.rb
index e8dda0ba16407f1dedc234eedd2488d848a342cc..be6b84b47aa76e52b3fcbd3c0ff327d628797d14 100644 (file)
@@ -454,10 +454,10 @@ CHANGESET
       diff.root = XML::Node.new "osmChange"
       delete = XML::Node.new "delete"
       diff.root << delete
-      delete << super_relation.to_xml_node
-      delete << used_relation.to_xml_node
-      delete << used_way.to_xml_node
-      delete << used_node.to_xml_node
+      delete << xml_node_for_relation(super_relation)
+      delete << xml_node_for_relation(used_relation)
+      delete << xml_node_for_way(used_way)
+      delete << xml_node_for_node(used_node)
 
       # update the changeset to one that this user owns
       %w[node way relation].each do |type|
@@ -586,9 +586,9 @@ CHANGESET
       diff.root = XML::Node.new "osmChange"
       delete = XML::Node.new "delete"
       diff.root << delete
-      delete << other_relation.to_xml_node
-      delete << used_way.to_xml_node
-      delete << used_node.to_xml_node
+      delete << xml_node_for_relation(other_relation)
+      delete << xml_node_for_way(used_way)
+      delete << xml_node_for_node(used_node)
 
       # update the changeset to one that this user owns
       %w[node way relation].each do |type|
@@ -629,9 +629,9 @@ CHANGESET
       delete = XML::Node.new "delete"
       diff.root << delete
       delete["if-unused"] = ""
-      delete << used_relation.to_xml_node
-      delete << used_way.to_xml_node
-      delete << used_node.to_xml_node
+      delete << xml_node_for_relation(used_relation)
+      delete << xml_node_for_way(used_way)
+      delete << xml_node_for_node(used_node)
 
       # update the changeset to one that this user owns
       %w[node way relation].each do |type|
@@ -1133,7 +1133,7 @@ CHANGESET
       diff = XML::Document.new
       diff.root = XML::Node.new "osmChange"
       modify = XML::Node.new "modify"
-      xml_old_node = old_node.to_xml_node
+      xml_old_node = xml_node_for_node(old_node)
       xml_old_node["lat"] = 2.0.to_s
       xml_old_node["lon"] = 2.0.to_s
       xml_old_node["changeset"] = changeset_id.to_s
@@ -1171,7 +1171,7 @@ CHANGESET
       diff = XML::Document.new
       diff.root = XML::Node.new "osmChange"
       modify = XML::Node.new "modify"
-      xml_old_way = old_way.to_xml_node
+      xml_old_way = xml_node_for_way(old_way)
       nd_ref = XML::Node.new "nd"
       nd_ref["ref"] = create(:node, :lat => 3, :lon => 3).id.to_s
       xml_old_way << nd_ref
@@ -1224,7 +1224,7 @@ CHANGESET
       diff.root = XML::Node.new "osmChange"
       delete = XML::Node.new "delete"
       diff.root << delete
-      delete << node.to_xml_node
+      delete << xml_node_for_node(node)
 
       # upload it
       error_format "xml"
@@ -1483,7 +1483,7 @@ CHANGESET
 
       # add (delete) a way to it, which contains a point at (3,3)
       with_controller(WaysController.new) do
-        xml = update_changeset(way.to_xml, changeset_id)
+        xml = update_changeset(xml_for_way(way), changeset_id)
         put :delete, :params => { :id => way.id }, :body => xml.to_s
         assert_response :success, "Couldn't delete a way."
       end