X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6ca22de4f2c68e4b14a6e2f0938a8657c33adc31..43c09d8062fc4aef4f1e0e5d3598e526a02bb288:/test/controllers/old_nodes_controller_test.rb diff --git a/test/controllers/old_nodes_controller_test.rb b/test/controllers/old_nodes_controller_test.rb index 2568cbfd8..94d16c8c0 100644 --- a/test/controllers/old_nodes_controller_test.rb +++ b/test/controllers/old_nodes_controller_test.rb @@ -59,8 +59,7 @@ class OldNodesControllerTest < ActionController::TestCase xml_node["lat"] = precision(rand * 180 - 90).to_s xml_node["lon"] = precision(rand * 360 - 180).to_s with_controller(NodesController.new) do - content xml_doc - put :update, :params => { :id => nodeid } + put :update, :params => { :id => nodeid }, :body => xml_doc.to_s assert_response :forbidden, "Should have rejected node update" xml_node["version"] = @response.body.to_s end @@ -75,8 +74,7 @@ class OldNodesControllerTest < ActionController::TestCase xml_tag["v"] = random_string xml_node << xml_tag with_controller(NodesController.new) do - content xml_doc - put :update, :params => { :id => nodeid } + put :update, :params => { :id => nodeid }, :body => xml_doc.to_s assert_response :forbidden, "should have rejected node #{nodeid} (#{@response.body}) with forbidden" xml_node["version"] = @response.body.to_s @@ -109,8 +107,7 @@ class OldNodesControllerTest < ActionController::TestCase xml_node["lat"] = precision(rand * 180 - 90).to_s xml_node["lon"] = precision(rand * 360 - 180).to_s with_controller(NodesController.new) do - content xml_doc - put :update, :params => { :id => nodeid } + put :update, :params => { :id => nodeid }, :body => xml_doc.to_s assert_response :success xml_node["version"] = @response.body.to_s end @@ -125,8 +122,7 @@ class OldNodesControllerTest < ActionController::TestCase xml_tag["v"] = random_string xml_node << xml_tag with_controller(NodesController.new) do - content xml_doc - put :update, :params => { :id => nodeid } + put :update, :params => { :id => nodeid }, :body => xml_doc.to_s assert_response :success, "couldn't update node #{nodeid} (#{@response.body})" xml_node["version"] = @response.body.to_s @@ -390,7 +386,7 @@ class OldNodesControllerTest < ActionController::TestCase def check_current_version(node_id) # get the current version of the node current_node = with_controller(NodesController.new) do - get :read, :params => { :id => node_id } + get :show, :params => { :id => node_id } assert_response :success, "cant get current node #{node_id}" Node.from_xml(@response.body) end