defmodule AutoLinkerTest do
use ExUnit.Case
doctest AutoLinker
test "phone number" do
assert AutoLinker.link(", work (555) 555-5555", phone: true) ==
~s{, work (555) 555-5555}
end
test "default link" do
assert AutoLinker.link("google.com") ==
"google.com"
end
test "markdown" do
assert AutoLinker.link("[google.com](http://google.com)", markdown: true) ==
"google.com"
end
test "does on link existing links" do
assert AutoLinker.link("google.com") ==
"google.com"
end
end