X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/b78bb9f6313f3139ac83784df52bf39a5619d3e7..a182820139de22196d7f30e06047a81afc7323f5:/test/models/changeset_test.rb diff --git a/test/models/changeset_test.rb b/test/models/changeset_test.rb index a5176fa8b..bc8c84fb1 100644 --- a/test/models/changeset_test.rb +++ b/test/models/changeset_test.rb @@ -6,11 +6,11 @@ class ChangesetTest < ActiveSupport::TestCase message_create = assert_raise(OSM::APIBadXMLError) do Changeset.from_xml(no_text, true) end - assert_match /Must specify a string with one or more characters/, message_create.message + assert_match(/Must specify a string with one or more characters/, message_create.message) message_update = assert_raise(OSM::APIBadXMLError) do Changeset.from_xml(no_text, false) end - assert_match /Must specify a string with one or more characters/, message_update.message + assert_match(/Must specify a string with one or more characters/, message_update.message) end def test_from_xml_no_changeset @@ -30,11 +30,11 @@ class ChangesetTest < ActiveSupport::TestCase message_create = assert_raise(OSM::APIBadXMLError) do Changeset.from_xml(nokv, true) end - assert_match /tag is missing key/, message_create.message + assert_match(/tag is missing key/, message_create.message) message_update = assert_raise(OSM::APIBadXMLError) do Changeset.from_xml(nokv, false) end - assert_match /tag is missing key/, message_update.message + assert_match(/tag is missing key/, message_update.message) end def test_from_xml_no_v @@ -42,11 +42,11 @@ class ChangesetTest < ActiveSupport::TestCase message_create = assert_raise(OSM::APIBadXMLError) do Changeset.from_xml(no_v, true) end - assert_match /tag is missing value/, message_create.message + assert_match(/tag is missing value/, message_create.message) message_update = assert_raise(OSM::APIBadXMLError) do Changeset.from_xml(no_v, false) end - assert_match /tag is missing value/, message_update.message + assert_match(/tag is missing value/, message_update.message) end def test_from_xml_duplicate_k @@ -64,10 +64,10 @@ class ChangesetTest < ActiveSupport::TestCase def test_from_xml_valid # Example taken from the Update section on the API_v0.6 docs on the wiki xml = "" - assert_nothing_raised(OSM::APIBadXMLError) do + assert_nothing_raised do Changeset.from_xml(xml, false) end - assert_nothing_raised(OSM::APIBadXMLError) do + assert_nothing_raised do Changeset.from_xml(xml, true) end end