X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/0d3a9ed9cb47ce3b89ea9eaffbb589f9a9ff6d22..90621b4b4f2b48a1dddde89bbaf748c3776e2020:/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