]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/old_nodes_controller_test.rb
Move Relation.to_xml and to_xml_node out of the model and into tests
[rails.git] / test / controllers / api / old_nodes_controller_test.rb
index 375a553b8fab2a266b3e840a9999fdd31c825c0e..941787d0a2872ddd39d31693cadfb2f40c67c580 100644 (file)
@@ -43,7 +43,7 @@ module Api
       basic_authorization private_user.email, "test"
 
       # setup a simple XML node
-      xml_doc = private_node.to_xml
+      xml_doc = xml_for_node(private_node)
       xml_node = xml_doc.find("//osm/node").first
       nodeid = private_node.id
 
@@ -91,7 +91,7 @@ module Api
 
       # setup a simple XML node
 
-      xml_doc = node.to_xml
+      xml_doc = xml_for_node(node)
       xml_node = xml_doc.find("//osm/node").first
       nodeid = node.id
 
@@ -156,8 +156,8 @@ module Api
     def check_not_found_id_version(id, version)
       get :version, :params => { :id => id, :version => version }
       assert_response :not_found
-    rescue ActionController::UrlGenerationError => ex
-      assert_match(/No route matches/, ex.to_s)
+    rescue ActionController::UrlGenerationError => e
+      assert_match(/No route matches/, e.to_s)
     end
 
     ##