add tests
This commit is contained in:
1 parent
674e37bae4
commit
22a1e023a4
2 files changed
+46
-1
No files matched your search
@@ -16,7 +16,7 @@ defmodule FeedReader.URL do
|
||||
|
||||
defp absolute?(url) when is_binary(url) do
|
||||
uri = URI.parse(url)
|
||||
is_binary(uri.scheme) and is_binary(uri.host)
|
||||
is_binary(uri.scheme) and uri.scheme != "" and is_binary(uri.host) and uri.host != ""
|
||||
rescue
|
||||
URI.Error -> false
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user