chronoscope/test/chronoscope/nts/parse_test.exs

16 lines
470 B
Elixir

defmodule Chronoscope.NTS.ParseTest do
use Chronoscope.Case, async: true
import Chronoscope.NTS.Parse
describe "Chronoscope.NTS.Parse.parse_nts_server()" do
test "parses a server with a port" do
assert parse_nts_server("test.example.com:1234") == %{host: "test.example.com", port: 1234}
end
test "parses a server without a port" do
assert parse_nts_server("test.example.com") == %{host: "test.example.com", port: 4460}
end
end
end