mirror of
https://github.com/Evolix/chexpire.git
synced 2024-07-01 21:42:52 +02:00
16 lines
359 B
Ruby
16 lines
359 B
Ruby
|
require "test_helper"
|
||
|
require "whois/parser"
|
||
|
require "whois/errors"
|
||
|
|
||
|
module Whois
|
||
|
class ParserTest < ActiveSupport::TestCase
|
||
|
test "should instanciate a parser class matching the tld" do
|
||
|
assert_kind_of Parser::Fr, Parser.for("example.fr")
|
||
|
|
||
|
assert_raises UnsupportedDomainError do
|
||
|
Parser.for("example.xyz")
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|