# encoding: utf-8 # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # /spec/fixtures/responses/whois.iana.org/int/status_registered.expected # # and regenerate the tests with the following rake task # # $ rake spec:generate # require 'spec_helper' require 'whois/record/parser/whois.iana.org.rb' describe Whois::Record::Parser::WhoisIanaOrg, "status_registered.expected" do before(:each) do file = fixture("responses", "whois.iana.org/int/status_registered.txt") part = Whois::Record::Part.new(:body => File.read(file)) @parser = klass.new(part) end describe "#status" do it do @parser.status.should == :registered end end describe "#available?" do it do @parser.available?.should == false end end describe "#registered?" do it do @parser.registered?.should == true end end describe "#created_on" do it do @parser.created_on.should be_a(Time) @parser.created_on.should == Time.parse("1997-08-26") end end describe "#updated_on" do it do @parser.updated_on.should be_a(Time) @parser.updated_on.should == Time.parse("2009-11-10") end end describe "#expires_on" do it do lambda { @parser.expires_on }.should raise_error(Whois::PropertyNotSupported) end end describe "#registrant_contacts" do it do @parser.registrant_contacts.should be_a(Array) @parser.registrant_contacts.should have(1).items @parser.registrant_contacts[0].should be_a(Whois::Record::Contact) @parser.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT @parser.registrant_contacts[0].id.should == nil @parser.registrant_contacts[0].name.should == nil @parser.registrant_contacts[0].organization.should == "North Atlantic Treaty Organization" @parser.registrant_contacts[0].address.should == "Blvd Leopold III" @parser.registrant_contacts[0].city.should == "1110 Brussels" @parser.registrant_contacts[0].zip.should == "Brussels" @parser.registrant_contacts[0].country.should == "Belgium" end end describe "#admin_contacts" do it do @parser.admin_contacts.should be_a(Array) @parser.admin_contacts.should have(1).items @parser.admin_contacts[0].should be_a(Whois::Record::Contact) @parser.admin_contacts[0].type.should == Whois::Record::Contact::TYPE_ADMIN @parser.admin_contacts[0].id.should == nil @parser.admin_contacts[0].name.should == "Aidan Murdock" @parser.admin_contacts[0].organization.should == nil @parser.admin_contacts[0].address.should == "SHAPE" @parser.admin_contacts[0].city.should == "NCSA/SDD/SAL" @parser.admin_contacts[0].zip.should == "Casteau Hainaut 7010" @parser.admin_contacts[0].country.should == "Belgium" @parser.admin_contacts[0].phone.should == "+32 65 44 7244" @parser.admin_contacts[0].fax.should == "+32 65 44 7221" @parser.admin_contacts[0].email.should == "aidan.murdock@ncsa.nato.int" end end describe "#technical_contacts" do it do @parser.technical_contacts.should be_a(Array) @parser.technical_contacts.should have(1).items @parser.technical_contacts[0].should be_a(Whois::Record::Contact) @parser.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL @parser.technical_contacts[0].id.should == nil @parser.technical_contacts[0].name.should == "Jack Smits" @parser.technical_contacts[0].organization.should == nil @parser.technical_contacts[0].address.should == "SHAPE" @parser.technical_contacts[0].city.should == "NCSA/SMD" @parser.technical_contacts[0].zip.should == "Casteau Hainaut 7010" @parser.technical_contacts[0].country.should == "Belgium" @parser.technical_contacts[0].phone.should == "+32 65 44 7534" @parser.technical_contacts[0].fax.should == "+32 65 44 7556" @parser.technical_contacts[0].email.should == "jack.smits@ncsa.nato.int" end end describe "#nameservers" do it do @parser.nameservers.should be_a(Array) @parser.nameservers.should have(4).items @parser.nameservers[0].should be_a(Whois::Record::Nameserver) @parser.nameservers[0].name.should == "max.nra.nato.int" @parser.nameservers[0].ipv4.should == "192.101.252.69" @parser.nameservers[1].should be_a(Whois::Record::Nameserver) @parser.nameservers[1].name.should == "maxima.nra.nato.int" @parser.nameservers[1].ipv4.should == "193.110.130.68" @parser.nameservers[2].should be_a(Whois::Record::Nameserver) @parser.nameservers[2].name.should == "ns.namsa.nato.int" @parser.nameservers[2].ipv4.should == "208.161.248.15" @parser.nameservers[3].should be_a(Whois::Record::Nameserver) @parser.nameservers[3].name.should == "ns.nc3a.nato.int" @parser.nameservers[3].ipv4.should == "195.169.116.6" end end end