summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_uri.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_uri.rb b/test/rubygems/test_gem_uri.rb
index 0c70443f32..7fe572518b 100644
--- a/test/rubygems/test_gem_uri.rb
+++ b/test/rubygems/test_gem_uri.rb
@@ -29,4 +29,11 @@ class TestUri < Gem::TestCase
def test_redacted_with_invalid_uri
assert_equal "https://www.example.com:80index", Gem::Uri.new("https://www.example.com:80index").redacted.to_s
end
+
+ def test_redacted_does_not_modify_uri
+ url = 'https://user:password@example.com'
+ uri = Gem::Uri.new(url)
+ assert_equal 'https://user:REDACTED@example.com', uri.redacted.to_s
+ assert_equal url, uri.to_s
+ end
end