Skip to content

Commit

Permalink
whois.biz missing tests for contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Sep 19, 2012
1 parent 13fdc5d commit cb7f380
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 2 deletions.
41 changes: 40 additions & 1 deletion spec/fixtures/responses/whois.biz/status_registered.expected
Expand Up @@ -13,7 +13,7 @@


#status
should: %s == %w( clientDeleteProhibited clientTransferProhibited clientUpdateProhibited )
should: %s == ["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]

#available?
should: %s == false
Expand Down Expand Up @@ -44,16 +44,55 @@
should: %s CLASS(array)
should: %s SIZE(1)
should: %s[0] CLASS(contact)
should: %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
should: %s[0].id == "MMR-32103"
should: %s[0].name == "DNS Admin"
should: %s[0].organization == "Google Inc."
should: %s[0].address == "2400 E. Bayshore Pkwy"
should: %s[0].city == "Mountain View"
should: %s[0].zip == "94043"
should: %s[0].state == "CA"
should: %s[0].country == "United States"
should: %s[0].country_code == "US"
should: %s[0].phone == "+1.6503300100"
should: %s[0].fax == "+1.6506181499"
should: %s[0].email == "dns-admin@GOOGLE.COM"

#admin_contacts
should: %s CLASS(array)
should: %s SIZE(1)
should: %s[0] CLASS(contact)
should: %s[0].type == Whois::Record::Contact::TYPE_ADMIN
should: %s[0].id == "MMR-32104"
should: %s[0].name == "DNS Admin"
should: %s[0].organization == "Google Inc."
should: %s[0].address == "2400 E. Bayshore Pkwy"
should: %s[0].city == "Mountain View"
should: %s[0].zip == "94043"
should: %s[0].state == "CA"
should: %s[0].country == "United States"
should: %s[0].country_code == "US"
should: %s[0].phone == "+1.6503300100"
should: %s[0].fax == "+1.6506181499"
should: %s[0].email == "dns-admin@GOOGLE.COM"

#technical_contacts
should: %s CLASS(array)
should: %s SIZE(1)
should: %s[0] CLASS(contact)
should: %s[0].type == Whois::Record::Contact::TYPE_TECHNICAL
should: %s[0].id == "MMR-32105"
should: %s[0].name == "DNS Admin"
should: %s[0].organization == "Google Inc."
should: %s[0].address == "2400 E. Bayshore Pkwy"
should: %s[0].city == "Mountain View"
should: %s[0].zip == "94043"
should: %s[0].state == "CA"
should: %s[0].country == "United States"
should: %s[0].country_code == "US"
should: %s[0].phone == "+1.6503300100"
should: %s[0].fax == "+1.6506181499"
should: %s[0].email == "dns-admin@google.com"


#nameservers
Expand Down
Expand Up @@ -43,7 +43,7 @@
end
describe "#status" do
it do
subject.status.should == %w( clientDeleteProhibited clientTransferProhibited clientUpdateProhibited )
subject.status.should == ["clientDeleteProhibited", "clientTransferProhibited", "clientUpdateProhibited"]
end
end
describe "#available?" do
Expand Down Expand Up @@ -86,20 +86,59 @@
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
Expand Down

0 comments on commit cb7f380

Please sign in to comment.