Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

121 lines (115 sloc) 3.771 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.cnnic.cn/status_registered.expected
#
# and regenerate the tests with the following rake task
#
# $ rake spec:generate
#
require 'spec_helper'
require 'whois/record/parser/whois.cnnic.cn.rb'
describe Whois::Record::Parser::WhoisCnnicCn, "status_registered.expected" do
subject do
file = fixture("responses", "whois.cnnic.cn/status_registered.txt")
part = Whois::Record::Part.new(:body => File.read(file))
described_class.new(part)
end
describe "#disclaimer" do
it do
lambda { subject.disclaimer }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#domain" do
it do
subject.domain.should == "google.cn"
end
end
describe "#domain_id" do
it do
subject.domain_id.should == "20030311s10001s00033735-cn"
end
end
describe "#status" do
it do
subject.status.should == ["clientDeleteProhibited", "serverDeleteProhibited", "clientUpdateProhibited", "serverUpdateProhibited", "clientTransferProhibited", "serverTransferProhibited"]
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("2003-03-17 12:20:05")
end
end
describe "#updated_on" do
it do
lambda { subject.updated_on }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#expires_on" do
it do
subject.expires_on.should be_a(Time)
subject.expires_on.should == Time.parse("2014-03-17 12:48:36")
end
end
describe "#registrar" do
it do
subject.registrar.should be_a(Whois::Record::Registrar)
subject.registrar.id.should == "MarkMonitor Inc."
subject.registrar.name.should == "MarkMonitor Inc."
subject.registrar.organization.should == nil
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 == "cnnic-zdmd-022"
subject.registrant_contacts[0].name.should == "Google Ireland Holdings"
subject.registrant_contacts[0].organization.should == nil
end
end
describe "#admin_contacts" do
it do
subject.admin_contacts.should be_a(Array)
subject.admin_contacts.should == []
end
end
describe "#technical_contacts" do
it do
lambda { subject.technical_contacts }.should raise_error(Whois::PropertyNotSupported)
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 == "ns2.google.com"
subject.nameservers[1].should be_a(Whois::Record::Nameserver)
subject.nameservers[1].name.should == "ns1.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
describe "#reserved?" do
it do
subject.reserved?.should == false
end
end
end
Jump to Line
Something went wrong with that request. Please try again.