test/answer/parser/whois.nic.mu_test.rb in whois-1.0.5 vs test/answer/parser/whois.nic.mu_test.rb in whois-1.0.6

- old
+ new

@@ -49,10 +49,23 @@ @klass.new(load_part('/ki/registered.txt')).expires_on assert_equal nil, @klass.new(load_part('/ki/available.txt')).expires_on end + + def test_nameservers + parser = @klass.new(load_part('/ki/registered.txt')) + expected = %w( ns1.google.com ns2.google.com ns3.google.com ns4.google.com ) + assert_equal expected, parser.nameservers + assert_equal expected, parser.instance_eval { @nameservers } + + parser = @klass.new(load_part('/ki/available.txt')) + expected = %w() + assert_equal expected, parser.nameservers + assert_equal expected, parser.instance_eval { @nameservers } + end + end class AnswerParserWhoisNicMuMuTest < AnswerParserWhoisNicMuTest def test_status @@ -90,8 +103,21 @@ def test_expires_on assert_equal Time.parse("2010-12-20"), @klass.new(load_part('/mu/registered.txt')).expires_on assert_equal nil, @klass.new(load_part('/mu/available.txt')).expires_on + end + + + def test_nameservers + parser = @klass.new(load_part('/mu/registered.txt')) + expected = %w( ns1.google.com ns2.google.com ns3.google.com ns4.google.com ) + assert_equal expected, parser.nameservers + assert_equal expected, parser.instance_eval { @nameservers } + + parser = @klass.new(load_part('/mu/available.txt')) + expected = %w() + assert_equal expected, parser.nameservers + assert_equal expected, parser.instance_eval { @nameservers } end end