Validate URLs
This commit is contained in:
@@ -5,6 +5,14 @@ class ManifiqueTest < Minitest::Test
|
||||
refute_nil ::Manifique::VERSION
|
||||
end
|
||||
|
||||
def test_init_without_url
|
||||
assert_raises(RuntimeError) { Manifique::Agent.new }
|
||||
end
|
||||
|
||||
def test_init_with_invalid_url
|
||||
assert_raises(RuntimeError) { Manifique::Agent.new(url: "htp:/foo.com") }
|
||||
end
|
||||
|
||||
def test_fetch_metadata
|
||||
agent = Manifique::Agent.new(url: 'https://example.com')
|
||||
assert_equal agent.fetch_metadata, 'https://example.com'
|
||||
|
||||
Reference in New Issue
Block a user