X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cbea796ef412840af9a3ec2fd26bf08657fc4cd3..e765a6691b887de42129af34d8926afdcd4a7560:/test/controllers/api/old_nodes_controller_test.rb diff --git a/test/controllers/api/old_nodes_controller_test.rb b/test/controllers/api/old_nodes_controller_test.rb index 0f8954541..76e78ffad 100644 --- a/test/controllers/api/old_nodes_controller_test.rb +++ b/test/controllers/api/old_nodes_controller_test.rb @@ -17,6 +17,14 @@ module Api { :path => "/api/0.6/node/1/2", :method => :get }, { :controller => "api/old_nodes", :action => "version", :id => "1", :version => "2" } ) + assert_routing( + { :path => "/api/0.6/node/1/history.json", :method => :get }, + { :controller => "api/old_nodes", :action => "history", :id => "1", :format => "json" } + ) + assert_routing( + { :path => "/api/0.6/node/1/2.json", :method => :get }, + { :controller => "api/old_nodes", :action => "version", :id => "1", :version => "2", :format => "json" } + ) assert_routing( { :path => "/api/0.6/node/1/2/redact", :method => :post }, { :controller => "api/old_nodes", :action => "redact", :id => "1", :version => "2" } @@ -43,7 +51,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 +99,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