]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/way_controller_test.rb
Fixed problem where tag lengths were generating a 422 error with no message. They...
[rails.git] / test / functional / way_controller_test.rb
index de23545f7d60b922e96a4ebff0986f3c00e6ed3a..862e700a68c85fa84eba541fc4b07aca1c076fac 100644 (file)
@@ -182,6 +182,16 @@ class WayControllerTest < ActionController::TestCase
     # expect failure
     assert_response :conflict, 
         "way upload to closed changeset did not return 'conflict'"    
+
+    # create a way with a tag which is too long
+    content "<osm><way changeset='#{open_changeset_id}'>" +
+      "<nd ref='#{nid1}'/>" +
+      "<tag k='foo' v='#{'x'*256}'/>" +
+      "</way></osm>"
+    put :create
+    # expect failure
+    assert_response :bad_request, 
+        "way upload to with too long tag did not return 'bad_request'"
   end
 
   # -------------------------------------