Browse files

Added one more registered test for whois.ua

  • Loading branch information...
1 parent b7a1bd8 commit 1e480ffbc10f8029cb92b51f792c9f3192f1f31f @Uko Uko committed May 31, 2012
View
104 spec/fixtures/responses/whois.ua/status_registered1.expected
@@ -0,0 +1,104 @@
+#domain
+ should: %s == "kyivstar.ua"
+
+#domain_id
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#referral_whois
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#referral_url
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#status
+ should: %s == :registered
+
+#available?
+ should: %s == false
+
+#registered?
+ should: %s == true
+
+
+#created_on
+ should: %s CLASS(time)
+ should: %s == Time.parse("2002-09-03 00:00:00")
+
+#updated_on
+ should: %s CLASS(time)
+ should: %s == Time.parse("2010-08-11 15:34:01")
+
+#expires_on
+ should: %s CLASS(time)
+ should: %s == Time.parse("2012-09-03 12:18:52")
+
+
+#registrar
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#registrant_contacts
+ should: %s raise_error(Whois::PropertyNotSupported)
+
+#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 == "N/A"
+ should: %s[0].name == nil
+ should: %s[0].organization == "Kyivstar GSM"
+ should: %s[0].address == "Chervonozoryanyi Av., 51"
+ should: %s[0].city == "KYIV"
+ should: %s[0].zip == "03110"
+ should: %s[0].state == nil
+ should: %s[0].country == "UA"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "+380 (44) 2473939"
+ should: %s[0].fax == "+380 (44) 2473954"
+ should: %s[0].email == "dnsmaster@kyivstar.net"
+ should: %s[0].created_on == nil
+ should: %s[0].updated_on == Time.parse("2008-09-02 12:52:47")
+
+#technical_contacts
+ should: %s CLASS(array)
+ should: %s SIZE(2)
+ should: %s[0] CLASS(contact)
+ should: %s[0].type == Whois::Record::Contact::TYPE_TECHNICAL
+ should: %s[0].id == "N/A"
+ should: %s[0].name == nil
+ should: %s[0].organization == "Kyivstar GSM"
+ should: %s[0].address == "Chervonozoryanyi Av., 51"
+ should: %s[0].city == "KYIV"
+ should: %s[0].zip == "03110"
+ should: %s[0].state == nil
+ should: %s[0].country == "UA"
+ should: %s[0].country_code == nil
+ should: %s[0].phone == "+380 (44) 2473939"
+ should: %s[0].fax == "+380 (44) 2473954"
+ should: %s[0].email == "dnsmaster@kyivstar.net"
+ should: %s[0].created_on == nil
+ should: %s[0].updated_on == Time.parse("2008-09-02 12:52:47")
+ should: %s[1] CLASS(contact)
+ should: %s[1].type == Whois::Record::Contact::TYPE_TECHNICAL
+ should: %s[1].id == "24361346"
+ should: %s[1].name == nil
+ should: %s[1].organization == "\"ElVisti Information Center\", LLC\nООО \"Информационный центр \"Электронные вести\"\nТОВ \"ІЦ ЕЛВІСТІ\""
+ should: %s[1].address == "а/с, 151"
+ should: %s[1].city == "КИЇВ"
+ should: %s[1].zip == "03037"
+ should: %s[1].state == nil
+ should: %s[1].country == "UA"
+ should: %s[1].country_code == nil
+ should: %s[1].phone == "+38044 239-90-91"
+ should: %s[1].fax == nil
+ should: %s[1].email == "hostmaster@visti.net"
+ should: %s[1].created_on == nil
+ should: %s[1].updated_on == Time.parse("2011-12-15 11:33:14")
+
+#nameservers
+ should: %s CLASS(array)
+ should: %s SIZE(2)
+ should: %s[0] CLASS(nameserver)
+ should: %s[0].name == "ns2.elvisti.kiev.ua"
+ should: %s[1] CLASS(nameserver)
+ should: %s[1].name == "ns.kyivstar.net"
View
84 spec/fixtures/responses/whois.ua/status_registered1.txt
@@ -0,0 +1,84 @@
+% request from 194.44.214.138
+% This is the Ukrainian Whois query server #I.
+% The Whois is subject to Terms of use
+% See https://hostmaster.ua/services/
+%
+
+
+% % .UA whois
+% Domain Record:
+% =============
+domain: kyivstar.ua
+admin-c: KG780-UANIC
+tech-c: KG780-UANIC
+tech-c: EIC-UANIC
+status: OK-UNTIL 20120903121852
+dom-public: NO
+license: 85310
+nserver: ns2.elvisti.kiev.ua
+nserver: ns.kyivstar.net
+mnt-by: EIC-UANIC (ua.visti)
+remark: notify: domain-reg@visti.net
+created: 0-UANIC 20020903000000
+changed: EIC-UANIC 20100811153401
+source: UANIC
+
+
+% Administrative Contact:
+% ======================
+nic-handle: KG780-UANIC
+organization: Kyivstar GSM
+address: Chervonozoryanyi Av., 51
+address: 03110 KYIV
+address: UA
+fax-no: +380 (44) 2473954
+phone: +380 (44) 2473939
+phone: +380 (67) 2372213
+e-mail: dnsmaster@kyivstar.net
+org-id: N/A
+mnt-by: NONE
+remark: hostmaster@kyivstar.net
+changed: KG780-UANIC 20080902125247
+source: UANIC
+
+% Technical Contact:
+% =================
+nic-handle: KG780-UANIC
+organization: Kyivstar GSM
+address: Chervonozoryanyi Av., 51
+address: 03110 KYIV
+address: UA
+fax-no: +380 (44) 2473954
+phone: +380 (44) 2473939
+phone: +380 (67) 2372213
+e-mail: dnsmaster@kyivstar.net
+org-id: N/A
+mnt-by: NONE
+remark: hostmaster@kyivstar.net
+changed: KG780-UANIC 20080902125247
+source: UANIC
+
+% Technical Contact:
+% =================
+nic-handle: EIC-UANIC
+organization: "ElVisti Information Center", LLC
+organization: ООО "Информационный центр "Электронные вести"
+organization: ТОВ "ІЦ ЕЛВІСТІ"
+address: а/с, 151
+address: 03037 КИЇВ
+address: UA
+phone: +38044 239-90-91
+e-mail: hostmaster@visti.net
+url: http://www.visti.net/
+org-id: 24361346
+mnt-by: NONE
+changed: EIC-UANIC 20111215113314
+source: UANIC
+
+
+% % .UA whois
+
+% Last update of whois database: 31 May 2012 11:44:08 +0300 (EEST)
+
+% Query time: 10 msec
+
View
157 spec/whois/record/parser/responses/whois.net.ua/status_registered1_spec.rb
@@ -0,0 +1,157 @@
+# 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.ua/status_registered1.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.ua.rb'
+
+describe Whois::Record::Parser::WhoisUa, "status_registered1.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.ua/status_registered1.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ end
+
+ describe "#domain" do
+ it do
+ @parser.domain.should == "kyivstar.ua"
+ end
+ end
+ describe "#domain_id" do
+ it do
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#referral_whois" do
+ it do
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#referral_url" do
+ it do
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
+ end
+ 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("2002-09-03 00:00:00")
+ end
+ end
+ describe "#updated_on" do
+ it do
+ @parser.updated_on.should be_a(Time)
+ @parser.updated_on.should == Time.parse("2010-08-11 15:34:01")
+ end
+ end
+ describe "#expires_on" do
+ it do
+ @parser.expires_on.should be_a(Time)
+ @parser.expires_on.should == Time.parse("2012-09-03 12:18:52")
+ end
+ end
+ describe "#registrar" do
+ it do
+ lambda { @parser.registrar }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#registrant_contacts" do
+ it do
+ lambda { @parser.registrant_contacts }.should raise_error(Whois::PropertyNotSupported)
+ 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 == "N/A"
+ @parser.admin_contacts[0].name.should == nil
+ @parser.admin_contacts[0].organization.should == "Kyivstar GSM"
+ @parser.admin_contacts[0].address.should == "Chervonozoryanyi Av., 51"
+ @parser.admin_contacts[0].city.should == "KYIV"
+ @parser.admin_contacts[0].zip.should == "03110"
+ @parser.admin_contacts[0].state.should == nil
+ @parser.admin_contacts[0].country.should == "UA"
+ @parser.admin_contacts[0].country_code.should == nil
+ @parser.admin_contacts[0].phone.should == "+380 (44) 2473939"
+ @parser.admin_contacts[0].fax.should == "+380 (44) 2473954"
+ @parser.admin_contacts[0].email.should == "dnsmaster@kyivstar.net"
+ @parser.admin_contacts[0].created_on.should == nil
+ @parser.admin_contacts[0].updated_on.should == Time.parse("2008-09-02 12:52:47")
+ end
+ end
+ describe "#technical_contacts" do
+ it do
+ @parser.technical_contacts.should be_a(Array)
+ @parser.technical_contacts.should have(2).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 == "N/A"
+ @parser.technical_contacts[0].name.should == nil
+ @parser.technical_contacts[0].organization.should == "Kyivstar GSM"
+ @parser.technical_contacts[0].address.should == "Chervonozoryanyi Av., 51"
+ @parser.technical_contacts[0].city.should == "KYIV"
+ @parser.technical_contacts[0].zip.should == "03110"
+ @parser.technical_contacts[0].state.should == nil
+ @parser.technical_contacts[0].country.should == "UA"
+ @parser.technical_contacts[0].country_code.should == nil
+ @parser.technical_contacts[0].phone.should == "+380 (44) 2473939"
+ @parser.technical_contacts[0].fax.should == "+380 (44) 2473954"
+ @parser.technical_contacts[0].email.should == "dnsmaster@kyivstar.net"
+ @parser.technical_contacts[0].created_on.should == nil
+ @parser.technical_contacts[0].updated_on.should == Time.parse("2008-09-02 12:52:47")
+ @parser.technical_contacts[1].should be_a(Whois::Record::Contact)
+ @parser.technical_contacts[1].type.should == Whois::Record::Contact::TYPE_TECHNICAL
+ @parser.technical_contacts[1].id.should == "24361346"
+ @parser.technical_contacts[1].name.should == nil
+ @parser.technical_contacts[1].organization.should == "\"ElVisti Information Center\", LLC\nООО \"Информационный центр \"Электронные вести\"\nТОВ \"ІЦ ЕЛВІСТІ\""
+ @parser.technical_contacts[1].address.should == "а/с, 151"
+ @parser.technical_contacts[1].city.should == "КИЇВ"
+ @parser.technical_contacts[1].zip.should == "03037"
+ @parser.technical_contacts[1].state.should == nil
+ @parser.technical_contacts[1].country.should == "UA"
+ @parser.technical_contacts[1].country_code.should == nil
+ @parser.technical_contacts[1].phone.should == "+38044 239-90-91"
+ @parser.technical_contacts[1].fax.should == nil
+ @parser.technical_contacts[1].email.should == "hostmaster@visti.net"
+ @parser.technical_contacts[1].created_on.should == nil
+ @parser.technical_contacts[1].updated_on.should == Time.parse("2011-12-15 11:33:14")
+ end
+ end
+ describe "#nameservers" do
+ it do
+ @parser.nameservers.should be_a(Array)
+ @parser.nameservers.should have(2).items
+ @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[0].name.should == "ns2.elvisti.kiev.ua"
+ @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[1].name.should == "ns.kyivstar.net"
+ end
+ end
+end
View
157 spec/whois/record/parser/responses/whois.ua/status_registered1_spec.rb
@@ -0,0 +1,157 @@
+# 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.ua/status_registered1.expected
+#
+# and regenerate the tests with the following rake task
+#
+# $ rake spec:generate
+#
+
+require 'spec_helper'
+require 'whois/record/parser/whois.ua.rb'
+
+describe Whois::Record::Parser::WhoisUa, "status_registered1.expected" do
+
+ before(:each) do
+ file = fixture("responses", "whois.ua/status_registered1.txt")
+ part = Whois::Record::Part.new(:body => File.read(file))
+ @parser = klass.new(part)
+ end
+
+ describe "#domain" do
+ it do
+ @parser.domain.should == "kyivstar.ua"
+ end
+ end
+ describe "#domain_id" do
+ it do
+ lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#referral_whois" do
+ it do
+ lambda { @parser.referral_whois }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#referral_url" do
+ it do
+ lambda { @parser.referral_url }.should raise_error(Whois::PropertyNotSupported)
+ end
+ 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("2002-09-03 00:00:00")
+ end
+ end
+ describe "#updated_on" do
+ it do
+ @parser.updated_on.should be_a(Time)
+ @parser.updated_on.should == Time.parse("2010-08-11 15:34:01")
+ end
+ end
+ describe "#expires_on" do
+ it do
+ @parser.expires_on.should be_a(Time)
+ @parser.expires_on.should == Time.parse("2012-09-03 12:18:52")
+ end
+ end
+ describe "#registrar" do
+ it do
+ lambda { @parser.registrar }.should raise_error(Whois::PropertyNotSupported)
+ end
+ end
+ describe "#registrant_contacts" do
+ it do
+ lambda { @parser.registrant_contacts }.should raise_error(Whois::PropertyNotSupported)
+ 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 == "N/A"
+ @parser.admin_contacts[0].name.should == nil
+ @parser.admin_contacts[0].organization.should == "Kyivstar GSM"
+ @parser.admin_contacts[0].address.should == "Chervonozoryanyi Av., 51"
+ @parser.admin_contacts[0].city.should == "KYIV"
+ @parser.admin_contacts[0].zip.should == "03110"
+ @parser.admin_contacts[0].state.should == nil
+ @parser.admin_contacts[0].country.should == "UA"
+ @parser.admin_contacts[0].country_code.should == nil
+ @parser.admin_contacts[0].phone.should == "+380 (44) 2473939"
+ @parser.admin_contacts[0].fax.should == "+380 (44) 2473954"
+ @parser.admin_contacts[0].email.should == "dnsmaster@kyivstar.net"
+ @parser.admin_contacts[0].created_on.should == nil
+ @parser.admin_contacts[0].updated_on.should == Time.parse("2008-09-02 12:52:47")
+ end
+ end
+ describe "#technical_contacts" do
+ it do
+ @parser.technical_contacts.should be_a(Array)
+ @parser.technical_contacts.should have(2).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 == "N/A"
+ @parser.technical_contacts[0].name.should == nil
+ @parser.technical_contacts[0].organization.should == "Kyivstar GSM"
+ @parser.technical_contacts[0].address.should == "Chervonozoryanyi Av., 51"
+ @parser.technical_contacts[0].city.should == "KYIV"
+ @parser.technical_contacts[0].zip.should == "03110"
+ @parser.technical_contacts[0].state.should == nil
+ @parser.technical_contacts[0].country.should == "UA"
+ @parser.technical_contacts[0].country_code.should == nil
+ @parser.technical_contacts[0].phone.should == "+380 (44) 2473939"
+ @parser.technical_contacts[0].fax.should == "+380 (44) 2473954"
+ @parser.technical_contacts[0].email.should == "dnsmaster@kyivstar.net"
+ @parser.technical_contacts[0].created_on.should == nil
+ @parser.technical_contacts[0].updated_on.should == Time.parse("2008-09-02 12:52:47")
+ @parser.technical_contacts[1].should be_a(Whois::Record::Contact)
+ @parser.technical_contacts[1].type.should == Whois::Record::Contact::TYPE_TECHNICAL
+ @parser.technical_contacts[1].id.should == "24361346"
+ @parser.technical_contacts[1].name.should == nil
+ @parser.technical_contacts[1].organization.should == "\"ElVisti Information Center\", LLC\nООО \"Информационный центр \"Электронные вести\"\nТОВ \"ІЦ ЕЛВІСТІ\""
+ @parser.technical_contacts[1].address.should == "а/с, 151"
+ @parser.technical_contacts[1].city.should == "КИЇВ"
+ @parser.technical_contacts[1].zip.should == "03037"
+ @parser.technical_contacts[1].state.should == nil
+ @parser.technical_contacts[1].country.should == "UA"
+ @parser.technical_contacts[1].country_code.should == nil
+ @parser.technical_contacts[1].phone.should == "+38044 239-90-91"
+ @parser.technical_contacts[1].fax.should == nil
+ @parser.technical_contacts[1].email.should == "hostmaster@visti.net"
+ @parser.technical_contacts[1].created_on.should == nil
+ @parser.technical_contacts[1].updated_on.should == Time.parse("2011-12-15 11:33:14")
+ end
+ end
+ describe "#nameservers" do
+ it do
+ @parser.nameservers.should be_a(Array)
+ @parser.nameservers.should have(2).items
+ @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[0].name.should == "ns2.elvisti.kiev.ua"
+ @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
+ @parser.nameservers[1].name.should == "ns.kyivstar.net"
+ end
+ end
+end

0 comments on commit 1e480ff

Please sign in to comment.