test/answer/parser/whois.nic.it_test.rb in whois-1.0.2 vs test/answer/parser/whois.nic.it_test.rb in whois-1.0.3

- old
+ new

@@ -90,18 +90,34 @@ assert_equal nil, @klass.new(load_part('/available.txt')).registrar end + def test_contact + contact = @klass.new(load_part('/contact.txt')).registrant + assert_instance_of Whois::Answer::Contact, contact + assert_equal "HTML1-ITNIC", contact.id + assert_equal "HTML.it srl", contact.name + assert_equal "HTML.it srl", contact.organization + assert_equal "Viale Alessandrino, 595", contact.address + assert_equal "Roma", contact.city + assert_equal "00172", contact.zip + assert_equal nil, contact.country + assert_equal "IT", contact.country_code + assert_equal Time.parse("2007-03-01 10:28:08"), contact.created_on + assert_equal Time.parse("2007-03-01 10:28:08"), contact.updated_on + end + def test_registrant contact = @klass.new(load_part('/registered.txt')).registrant assert_instance_of Whois::Answer::Contact, contact assert_equal "GOOG175-ITNIC", contact.id assert_equal "Google Ireland Holdings", contact.name assert_equal nil, contact.organization assert_equal "30 Herbert Street", contact.address assert_equal "Dublin", contact.city + assert_equal "2", contact.zip assert_equal nil, contact.country assert_equal "IE", contact.country_code assert_equal Time.parse("2008-11-27 16:47:22"), contact.created_on assert_equal Time.parse("2008-11-27 16:47:22"), contact.updated_on end @@ -109,19 +125,19 @@ def test_registrant_with_available assert_equal nil, @klass.new(load_part('/available.txt')).registrant end - def test_admin contact = @klass.new(load_part('/registered.txt')).admin assert_instance_of Whois::Answer::Contact, contact assert_equal "TT4277-ITNIC", contact.id assert_equal "Tsao Tu", contact.name assert_equal "Tu Tsao", contact.organization assert_equal "30 Herbert Street", contact.address assert_equal "Dublin", contact.city + assert_equal "2", contact.zip assert_equal nil, contact.country assert_equal "IE", contact.country_code assert_equal Time.parse("2008-11-27 16:47:22"), contact.created_on assert_equal Time.parse("2008-11-27 16:47:22"), contact.updated_on end @@ -129,19 +145,19 @@ def test_admin_with_available assert_equal nil, @klass.new(load_part('/available.txt')).admin end - def test_technical contact = @klass.new(load_part('/registered.txt')).technical assert_instance_of Whois::Answer::Contact, contact assert_equal "TS7016-ITNIC", contact.id assert_equal "Technical Services", contact.name assert_equal nil, contact.organization assert_equal nil, contact.address assert_equal nil, contact.city + assert_equal nil, contact.zip assert_equal nil, contact.country assert_equal nil, contact.country_code assert_equal nil, contact.created_on assert_equal nil, contact.updated_on end @@ -153,12 +169,9 @@ def test_nameservers assert_equal %w(ns1.google.com ns4.google.com ns2.google.com ns3.google.com), @klass.new(load_part('/registered.txt')).nameservers - end - - def test_nameservers_with_available assert_equal nil, @klass.new(load_part('/available.txt')).nameservers end \ No newline at end of file