X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8264fb92ffeb46e06229a41b1db05a3bb6b8d3a6..a0b76fc2c5290534c90d8a16d50eb302424d8c21:/test/functional/amf_controller_test.rb diff --git a/test/functional/amf_controller_test.rb b/test/functional/amf_controller_test.rb index 3bb1d273e..2c76dfc9c 100644 --- a/test/functional/amf_controller_test.rb +++ b/test/functional/amf_controller_test.rb @@ -529,6 +529,24 @@ class AmfControllerTest < ActionController::TestCase end + def test_startchangeset_invalid_xmlchar_comment + invalid = "\035\022" + comment = "foo#{invalid}bar" + + amf_content "startchangeset", "/1", ["test@example.com:test", Hash.new, nil, comment, 1] + post :amf_write + assert_response :success + amf_parse_response + result = amf_result("/1") + + assert_equal 3, result.size, result.inspect + assert_equal 0, result[0] + new_cs_id = result[2] + + cs = Changeset.find(new_cs_id) + assert_equal "foobar", cs.tags["comment"] + end + # ************************************************************ # AMF Helper functions