]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/relation_controller_test.rb
Merged 14009:14059 from trunk.
[rails.git] / test / functional / relation_controller_test.rb
index b8d15e5294f43f0c17d20ef9708cc05e9c175bd9..f52981233371097a9cd3ad94a1a25f592b5c5405 100644 (file)
@@ -276,7 +276,8 @@ class RelationControllerTest < ActionController::TestCase
     # try to delete without specifying a changeset
     content "<osm><relation id='#{current_relations(:visible_relation).id}'/></osm>"
     delete :delete, :id => current_relations(:visible_relation).id
-    assert_response :conflict
+    assert_response :bad_request
+    assert_match(/You are missing the required changeset in the relation/, @response.body)
 
     # try to delete with an invalid (closed) changeset
     content update_changeset(current_relations(:visible_relation).to_xml,
@@ -539,8 +540,7 @@ OSM
   ##
   # parse some xml
   def xml_parse(xml)
-    parser = XML::Parser.new
-    parser.string = xml
+    parser = XML::Parser.string(xml)
     parser.parse
   end
 end