test/test_iri.rb in iri-0.4.3 vs test/test_iri.rb in iri-0.5.0

- old
+ new

@@ -41,9 +41,19 @@ .port('443') .to_s assert_equal('https://localhost:443/?q=books+about+tennis&limit=10', url) end + def test_broken_uri + assert_raises Iri::InvalidURI do + Iri.new('https://example.com/>', safe: false).add(a: 1) + end + end + + def test_broken_uri_in_safe_mode + Iri.new('https://example.com/>>>').add(a: 1) + end + def test_starts_with_empty_uri assert_equal( 'https:', Iri.new.scheme('https').to_s )