21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-06-27 03:22:54 +02:00
chexpire/test/services/whois/parser/fr_test.rb
2018-05-30 17:01:32 +02:00

22 lines
585 B
Ruby

require "test_helper"
require "whois/parser/fr"
require "whois/response"
module Whois
class FrTest < ActiveSupport::TestCase
setup do
@parser = Parser::Fr.new("domain.fr")
@domain_fr = file_fixture("whois/domain.fr.txt").read
end
test "should parse a whois response" do
response = @parser.parse(@domain_fr)
assert_kind_of Response, response
assert_equal Date.new(2004, 2, 18), response.created_on
assert_equal Date.new(2017, 1, 28), response.updated_on
assert_equal Date.new(2019, 2, 17), response.expire_on
end
end
end