# 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.nic.cc/status_registered.expected # # and regenerate the tests with the following rake task # # $ rake genspec:parsers # require 'spec_helper' require 'whois/record/parser/whois.nic.cc.rb' describe Whois::Record::Parser::WhoisNicCc, "status_registered.expected" do before(:each) do file = fixture("responses", "whois.nic.cc/status_registered.txt") part = Whois::Record::Part.new(:body => File.read(file)) @parser = klass.new(part) end context "#disclaimer" do it do @parser.disclaimer.should == "TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time." end end context "#domain" do it do @parser.domain.should == "google.cc" end end context "#domain_id" do it do lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported) end end context "#referral_whois" do it do @parser.referral_whois.should == "whois.markmonitor.com" end end context "#referral_url" do it do @parser.referral_url.should == "http://www.markmonitor.com" end end context "#status" do it do @parser.status.should == ["CLIENT-XFER-PROHIBITED", "CLIENT-UPDATE-PROHIBITED", "CLIENT-DELETE-PROHIBITED"] end end context "#available?" do it do @parser.available?.should == false end end context "#registered?" do it do @parser.registered?.should == true end end context "#created_on" do it do @parser.created_on.should be_a(Time) @parser.created_on.should == Time.parse("1999-06-07") end end context "#updated_on" do it do @parser.updated_on.should be_a(Time) @parser.updated_on.should == Time.parse("2009-05-06") end end context "#expires_on" do it do @parser.expires_on.should be_a(Time) @parser.expires_on.should == Time.parse("2010-06-07") end end context "#registrar" do it do @parser.registrar.should == nil end end context "#nameservers" do it do @parser.nameservers.should be_a(Array) @parser.nameservers.should have(4).items @parser.nameservers[0].should be_a(_nameserver) @parser.nameservers[0].name.should == "ns2.google.com" @parser.nameservers[1].should be_a(_nameserver) @parser.nameservers[1].name.should == "ns1.google.com" @parser.nameservers[2].should be_a(_nameserver) @parser.nameservers[2].name.should == "ns4.google.com" @parser.nameservers[3].should be_a(_nameserver) @parser.nameservers[3].name.should == "ns3.google.com" end end end