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
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
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
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