Remove arguments from assert_nothing_raised
It has never done anything with the argument and rails 5.0 warns that rails 5.1 will remove the argument.
This commit is contained in:
parent
f8f7054fc2
commit
b00b9ce626
6 changed files with 15 additions and 15 deletions
|
@ -151,7 +151,7 @@ class BoundingBoxTest < ActiveSupport::TestCase
|
|||
|
||||
def test_good_bbox_boundaries
|
||||
@good_bbox.each do |bbox_string|
|
||||
assert_nothing_raised(OSM::APIBadBoundingBox) { BoundingBox.from_s(bbox_string).check_boundaries }
|
||||
assert_nothing_raised { BoundingBox.from_s(bbox_string).check_boundaries }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -196,14 +196,14 @@ class BoundingBoxTest < ActiveSupport::TestCase
|
|||
|
||||
def test_good_bbox_size
|
||||
@good_bbox.each do |bbox_string|
|
||||
assert_nothing_raised(OSM::APIBadBoundingBox) { BoundingBox.from_s(bbox_string).check_size }
|
||||
assert_nothing_raised { BoundingBox.from_s(bbox_string).check_size }
|
||||
end
|
||||
end
|
||||
|
||||
def test_size_to_big
|
||||
@bad_big_bbox.each do |bbox_string|
|
||||
bbox = nil
|
||||
assert_nothing_raised(OSM::APIBadBoundingBox) { bbox = BoundingBox.from_bbox_params(:bbox => bbox_string).check_boundaries }
|
||||
assert_nothing_raised { bbox = BoundingBox.from_bbox_params(:bbox => bbox_string).check_boundaries }
|
||||
exception = assert_raise(OSM::APIBadBoundingBox) { bbox.check_size }
|
||||
assert_equal(@size_error_message, exception.message)
|
||||
end
|
||||
|
|
|
@ -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 = "<osm><changeset><tag k=\"comment\" v=\"Just adding some streetnames and a restaurant\"/></changeset></osm>"
|
||||
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
|
||||
|
|
|
@ -166,7 +166,7 @@ class NodeTest < ActiveSupport::TestCase
|
|||
version = 1
|
||||
noid = "<osm><node lat='#{lat}' lon='#{lon}' changeset='#{changeset}' version='#{version}' /></osm>"
|
||||
# First try a create which doesn't need the id
|
||||
assert_nothing_raised(OSM::APIBadXMLError) do
|
||||
assert_nothing_raised do
|
||||
Node.from_xml(noid, true)
|
||||
end
|
||||
# Now try an update with no id, and make sure that it gives the appropriate exception
|
||||
|
@ -214,7 +214,7 @@ class NodeTest < ActiveSupport::TestCase
|
|||
|
||||
def test_from_xml_no_version
|
||||
no_version = "<osm><node id='123' lat='23' lon='23' changeset='23' /></osm>"
|
||||
assert_nothing_raised(OSM::APIBadXMLError) do
|
||||
assert_nothing_raised do
|
||||
Node.from_xml(no_version, true)
|
||||
end
|
||||
message_update = assert_raise(OSM::APIBadXMLError) do
|
||||
|
@ -239,7 +239,7 @@ class NodeTest < ActiveSupport::TestCase
|
|||
id_list = ["", "0", "00", "0.0", "a"]
|
||||
id_list.each do |id|
|
||||
zero_id = "<osm><node id='#{id}' lat='12.3' lon='12.3' changeset='33' version='23' /></osm>"
|
||||
assert_nothing_raised(OSM::APIBadUserInput) do
|
||||
assert_nothing_raised do
|
||||
Node.from_xml(zero_id, true)
|
||||
end
|
||||
message_update = assert_raise(OSM::APIBadUserInput) do
|
||||
|
|
|
@ -28,7 +28,7 @@ class RedactionTest < ActiveSupport::TestCase
|
|||
r = create(:redaction)
|
||||
|
||||
assert_equal(false, node_v1.redacted?, "Expected node to not be redacted already.")
|
||||
assert_nothing_raised(OSM::APICannotRedactError) do
|
||||
assert_nothing_raised do
|
||||
node_v1.redact!(r)
|
||||
end
|
||||
assert_equal(true, node_v1.redacted?, "Expected node version 1 to be redacted after redact! call.")
|
||||
|
|
|
@ -3,7 +3,7 @@ require "test_helper"
|
|||
class RelationTest < ActiveSupport::TestCase
|
||||
def test_from_xml_no_id
|
||||
noid = "<osm><relation version='12' changeset='23' /></osm>"
|
||||
assert_nothing_raised(OSM::APIBadXMLError) do
|
||||
assert_nothing_raised do
|
||||
Relation.from_xml(noid, true)
|
||||
end
|
||||
message = assert_raise(OSM::APIBadXMLError) do
|
||||
|
@ -26,7 +26,7 @@ class RelationTest < ActiveSupport::TestCase
|
|||
|
||||
def test_from_xml_no_version
|
||||
no_version = "<osm><relation id='123' changeset='23' /></osm>"
|
||||
assert_nothing_raised(OSM::APIBadXMLError) do
|
||||
assert_nothing_raised do
|
||||
Relation.from_xml(no_version, true)
|
||||
end
|
||||
message_update = assert_raise(OSM::APIBadXMLError) do
|
||||
|
@ -39,7 +39,7 @@ class RelationTest < ActiveSupport::TestCase
|
|||
id_list = ["", "0", "00", "0.0", "a"]
|
||||
id_list.each do |id|
|
||||
zero_id = "<osm><relation id='#{id}' changeset='332' version='23' /></osm>"
|
||||
assert_nothing_raised(OSM::APIBadUserInput) do
|
||||
assert_nothing_raised do
|
||||
Relation.from_xml(zero_id, true)
|
||||
end
|
||||
message_update = assert_raise(OSM::APIBadUserInput) do
|
||||
|
|
|
@ -42,7 +42,7 @@ class WayTest < ActiveSupport::TestCase
|
|||
|
||||
def test_from_xml_no_id
|
||||
noid = "<osm><way version='12' changeset='23' /></osm>"
|
||||
assert_nothing_raised(OSM::APIBadXMLError) do
|
||||
assert_nothing_raised do
|
||||
Way.from_xml(noid, true)
|
||||
end
|
||||
message = assert_raise(OSM::APIBadXMLError) do
|
||||
|
@ -65,7 +65,7 @@ class WayTest < ActiveSupport::TestCase
|
|||
|
||||
def test_from_xml_no_version
|
||||
no_version = "<osm><way id='123' changeset='23' /></osm>"
|
||||
assert_nothing_raised(OSM::APIBadXMLError) do
|
||||
assert_nothing_raised do
|
||||
Way.from_xml(no_version, true)
|
||||
end
|
||||
message_update = assert_raise(OSM::APIBadXMLError) do
|
||||
|
@ -78,7 +78,7 @@ class WayTest < ActiveSupport::TestCase
|
|||
id_list = ["", "0", "00", "0.0", "a"]
|
||||
id_list.each do |id|
|
||||
zero_id = "<osm><way id='#{id}' changeset='33' version='23' /></osm>"
|
||||
assert_nothing_raised(OSM::APIBadUserInput) do
|
||||
assert_nothing_raised do
|
||||
Way.from_xml(zero_id, true)
|
||||
end
|
||||
message_update = assert_raise(OSM::APIBadUserInput) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue