Permalink
Fetching contributors…
Cannot retrieve contributors at this time
159 lines (153 sloc) 6.29 KB
# 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.biz/status_registered.expected
#
# and regenerate the tests with the following rake task
#
# $ rake spec:generate
#
require 'spec_helper'
require 'whois/record/parser/whois.biz.rb'
describe Whois::Record::Parser::WhoisBiz, "status_registered.expected" do
subject do
file = fixture("responses", "whois.biz/status_registered.txt")
part = Whois::Record::Part.new(:body => File.read(file))
described_class.new(part)
end
describe "#domain" do
it do
subject.domain.should == "google.biz"
end
end
describe "#domain_id" do
it do
subject.domain_id.should == "D2835288-BIZ"
end
end
describe "#referral_whois" do
it do
lambda { subject.referral_whois }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#referral_url" do
it do
lambda { subject.referral_url }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#status" do
it do
subject.status.should == ["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]
end
end
describe "#available?" do
it do
subject.available?.should == false
end
end
describe "#registered?" do
it do
subject.registered?.should == true
end
end
describe "#created_on" do
it do
subject.created_on.should be_a(Time)
subject.created_on.should == Time.parse("2002-03-27 00:01:00 UTC")
end
end
describe "#updated_on" do
it do
subject.updated_on.should be_a(Time)
subject.updated_on.should == Time.parse("2009-03-01 12:01:04 UTC")
end
end
describe "#expires_on" do
it do
subject.expires_on.should be_a(Time)
subject.expires_on.should == Time.parse("2010-03-26 23:59:59 UTC")
end
end
describe "#registrar" do
it do
subject.registrar.should be_a(Whois::Record::Registrar)
subject.registrar.id.should == "292"
subject.registrar.name.should == "MARKMONITOR, INC."
end
end
describe "#registrant_contacts" do
it do
subject.registrant_contacts.should be_a(Array)
subject.registrant_contacts.should have(1).items
subject.registrant_contacts[0].should be_a(Whois::Record::Contact)
subject.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
subject.registrant_contacts[0].id.should == "MMR-32103"
subject.registrant_contacts[0].name.should == "DNS Admin"
subject.registrant_contacts[0].organization.should == "Google Inc."
subject.registrant_contacts[0].address.should == "2400 E. Bayshore Pkwy"
subject.registrant_contacts[0].city.should == "Mountain View"
subject.registrant_contacts[0].zip.should == "94043"
subject.registrant_contacts[0].state.should == "CA"
subject.registrant_contacts[0].country.should == "United States"
subject.registrant_contacts[0].country_code.should == "US"
subject.registrant_contacts[0].phone.should == "+1.6503300100"
subject.registrant_contacts[0].fax.should == "+1.6506181499"
subject.registrant_contacts[0].email.should == "dns-admin@GOOGLE.COM"
end
end
describe "#admin_contacts" do
it do
subject.admin_contacts.should be_a(Array)
subject.admin_contacts.should have(1).items
subject.admin_contacts[0].should be_a(Whois::Record::Contact)
subject.admin_contacts[0].type.should == Whois::Record::Contact::TYPE_ADMIN
subject.admin_contacts[0].id.should == "MMR-32104"
subject.admin_contacts[0].name.should == "DNS Admin"
subject.admin_contacts[0].organization.should == "Google Inc."
subject.admin_contacts[0].address.should == "2400 E. Bayshore Pkwy"
subject.admin_contacts[0].city.should == "Mountain View"
subject.admin_contacts[0].zip.should == "94043"
subject.admin_contacts[0].state.should == "CA"
subject.admin_contacts[0].country.should == "United States"
subject.admin_contacts[0].country_code.should == "US"
subject.admin_contacts[0].phone.should == "+1.6503300100"
subject.admin_contacts[0].fax.should == "+1.6506181499"
subject.admin_contacts[0].email.should == "dns-admin@GOOGLE.COM"
end
end
describe "#technical_contacts" do
it do
subject.technical_contacts.should be_a(Array)
subject.technical_contacts.should have(1).items
subject.technical_contacts[0].should be_a(Whois::Record::Contact)
subject.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
subject.technical_contacts[0].id.should == "MMR-32105"
subject.technical_contacts[0].name.should == "DNS Admin"
subject.technical_contacts[0].organization.should == "Google Inc."
subject.technical_contacts[0].address.should == "2400 E. Bayshore Pkwy"
subject.technical_contacts[0].city.should == "Mountain View"
subject.technical_contacts[0].zip.should == "94043"
subject.technical_contacts[0].state.should == "CA"
subject.technical_contacts[0].country.should == "United States"
subject.technical_contacts[0].country_code.should == "US"
subject.technical_contacts[0].phone.should == "+1.6503300100"
subject.technical_contacts[0].fax.should == "+1.6506181499"
subject.technical_contacts[0].email.should == "dns-admin@google.com"
end
end
describe "#nameservers" do
it do
subject.nameservers.should be_a(Array)
subject.nameservers.should have(4).items
subject.nameservers[0].should be_a(Whois::Record::Nameserver)
subject.nameservers[0].name.should == "ns1.google.com"
subject.nameservers[1].should be_a(Whois::Record::Nameserver)
subject.nameservers[1].name.should == "ns2.google.com"
subject.nameservers[2].should be_a(Whois::Record::Nameserver)
subject.nameservers[2].name.should == "ns3.google.com"
subject.nameservers[3].should be_a(Whois::Record::Nameserver)
subject.nameservers[3].name.should == "ns4.google.com"
end
end
end