aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_source.rb')
-rw-r--r--test/rubygems/test_gem_source.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_source.rb b/test/rubygems/test_gem_source.rb
index 2629f180a9..3de9073f96 100644
--- a/test/rubygems/test_gem_source.rb
+++ b/test/rubygems/test_gem_source.rb
@@ -184,5 +184,16 @@ class TestGemSource < Gem::TestCase
end
end
+ def test_uri_equals
+ @source.api_uri # cached
+
+ refute_equal URI('https://secure.example'), @source.api_uri
+
+ @source.uri = URI 'https://secure.example'
+
+ assert_equal URI('https://secure.example'), @source.uri
+ assert_equal URI('https://secure.example'), @source.api_uri
+ end
+
end