mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
[rubygems/rubygems] Add a few tests for Gem::UriParser.parse_uri
1ea73df161
This commit is contained in:
parent
5f205073d2
commit
14a9e24f7e
Notes:
git
2021-08-31 19:06:59 +09:00
1 changed files with 17 additions and 0 deletions
17
test/rubygems/test_gem_uri_parser.rb
Normal file
17
test/rubygems/test_gem_uri_parser.rb
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
require_relative 'helper'
|
||||||
|
require 'uri'
|
||||||
|
require 'rubygems/uri_parser'
|
||||||
|
|
||||||
|
class TestUriParser < Gem::TestCase
|
||||||
|
def test_parse_uri_none_string
|
||||||
|
assert_equal :not_a_uri, Gem::UriParser.parse_uri(:not_a_uri)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_parse_uri_invalid_uri
|
||||||
|
assert_equal "https://www.example.com:80index", Gem::UriParser.parse_uri("https://www.example.com:80index")
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_parse_uri
|
||||||
|
assert_equal URI::HTTPS, Gem::UriParser.parse_uri("https://www.example.com").class
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue