summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/uri/test_generic.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb
index 3510129832..803d427f13 100644
--- a/test/uri/test_generic.rb
+++ b/test/uri/test_generic.rb
@@ -749,6 +749,15 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_equal('foo:xyzzy', uri.to_s)
end
+ def test_bad_password_component
+ uri = URI.parse('http://foo:bar@baz')
+ password = 'foo@bar'
+ e = assert_raise(URI::InvalidComponentError) do
+ uri.password = password
+ end
+ refute_match password, e.message
+ end
+
def test_set_scheme
uri = URI.parse 'HTTP://example'