X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/65eb6af30377bb98a0da691f69d3ad9b68b831e2..86bb9e5a50cd38de813705d99ee63ebd4d15e079:/test/unit/node_test.rb?ds=inline diff --git a/test/unit/node_test.rb b/test/unit/node_test.rb index dd907f0f4..24300e428 100644 --- a/test/unit/node_test.rb +++ b/test/unit/node_test.rb @@ -270,6 +270,18 @@ class NodeTest < ActiveSupport::TestCase assert_match /Must specify a string with one or more characters/, message_update.message end + def test_from_xml_no_node + no_node = "" + message_create = assert_raise(OSM::APIBadXMLError) { + Node.from_xml(no_node, true) + } + assert_match /XML doesn't contain an osm\/node element/, message_create.message + message_update = assert_raise(OSM::APIBadXMLError) { + Node.from_xml(no_node, false) + } + assert_match /XML doesn't contain an osm\/node element/, message_update.message + end + def test_from_xml_no_k_v nokv = "" message_create = assert_raise(OSM::APIBadXMLError) {