X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2c67c079ac39cefd3b096524fc0b7364b0eb21d7..d9f3ceed958a1d39b17bc4719b59ef8a226ace70:/test/functional/node_controller_test.rb diff --git a/test/functional/node_controller_test.rb b/test/functional/node_controller_test.rb index 6903dd60b..32667d9c9 100644 --- a/test/functional/node_controller_test.rb +++ b/test/functional/node_controller_test.rb @@ -122,6 +122,22 @@ class NodeControllerTest < ActionController::TestCase assert_response :bad_request, "node upload did not return bad_request status" assert_equal "Cannot parse valid node from xml string . lon missing", @response.body + # test that the upload is rejected when lat is non-numeric + # create a minimal xml file + content("") + put :create + # hope for success + assert_response :bad_request, "node upload did not return bad_request status" + assert_equal "Cannot parse valid node from xml string . lat not a number", @response.body + + # test that the upload is rejected when lon is non-numeric + # create a minimal xml file + content("") + put :create + # hope for success + assert_response :bad_request, "node upload did not return bad_request status" + assert_equal "Cannot parse valid node from xml string . lon not a number", @response.body + # test that the upload is rejected when we have a tag which is too long content("") put :create