forked from weppos/whois
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
whois.nic.cz parser must support `Update prohibited' statuses.
- Loading branch information
Showing
5 changed files
with
139 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
spec/fixtures/responses/whois.nic.cz/property_status_update_prohibited.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#status | ||
should: %s == :registered | ||
|
||
#available? | ||
should: %s == false | ||
|
||
#registered? | ||
should: %s == true |
83 changes: 83 additions & 0 deletions
83
spec/fixtures/responses/whois.nic.cz/property_status_update_prohibited.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
% (c) 2006-2011 CZ.NIC, z.s.p.o. | ||
% | ||
% Intended use of supplied data and information | ||
% | ||
% Data contained in the domain name register, as well as information | ||
% supplied through public information services of CZ.NIC association, | ||
% are appointed only for purposes connected with Internet network | ||
% administration and operation, or for the purpose of legal or other | ||
% similar proceedings, in process as regards a matter connected | ||
% particularly with holding and using a concrete domain name. | ||
% | ||
% Full text available at: | ||
% http://www.nic.cz/page/306/intended-use-of-supplied-data-and-information/ | ||
% | ||
% See also a search service at http://www.nic.cz/whois/ | ||
% | ||
% | ||
% Whoisd Server Version: 3.4.0 | ||
% Timestamp: Wed Jun 29 09:48:24 2011 | ||
|
||
domain: forpsi.cz | ||
registrant: SB:INTERNET-CZ | ||
nsset: FORPSI | ||
registrar: REG-INTERNET-CZ | ||
status: Update prohibited | ||
status: Sponsoring registrar change prohibited | ||
registered: 25.10.2004 15:05:00 | ||
changed: 19.05.2011 08:36:38 | ||
expire: 25.10.2018 | ||
|
||
contact: SB:INTERNET-CZ | ||
org: INTERNET CZ, a.s. | ||
name: Stefano Cecconi | ||
address: Ktiš 2 | ||
address: Ktiš | ||
address: 384 03 | ||
address: CZ | ||
phone: +420.383835353 | ||
fax-no: +420.383835354 | ||
e-mail: domain@forpsi.com | ||
registrar: REG-INTERNET-CZ | ||
created: 18.11.2001 19:46:00 | ||
changed: 06.06.2011 13:56:51 | ||
|
||
nsset: FORPSI | ||
nserver: ns.forpsi.net | ||
nserver: ns.forpsi.cz (81.2.209.185) | ||
nserver: ns.forpsi.it | ||
tech-c: FORPSI | ||
registrar: REG-INTERNET-CZ | ||
created: 01.10.2007 10:19:47 | ||
changed: 30.09.2010 10:21:36 | ||
|
||
contact: FORPSI | ||
org: INTERNET CZ, a.s. | ||
name: Stefano Cecconi | ||
address: Ktiš 2 | ||
address: Ktiš | ||
address: 38403 | ||
address: CZ | ||
fax-no: +420.383835354 | ||
registrar: REG-INTERNET-CZ | ||
created: 04.08.2008 14:42:08 | ||
changed: 06.06.2011 13:55:12 | ||
|
||
nsset: FORPSI.CZ | ||
nserver: ns.forpsi.net | ||
nserver: ns.forpsi.us | ||
tech-c: CID:IGN-C181273-TSC | ||
registrar: REG-IGNUM | ||
created: 24.08.2008 16:07:09 | ||
|
||
contact: CID:IGN-C181273-TSC | ||
name: Dana Stádníková | ||
address: Gončarenkova 40 | ||
address: Praha 4 | ||
address: 14700 | ||
address: CZ | ||
registrar: REG-IGNUM | ||
created: 21.02.2008 21:10:03 | ||
changed: 24.08.2008 16:38:14 | ||
|
||
|
39 changes: 39 additions & 0 deletions
39
spec/whois/record/parser/responses/whois.nic.cz/property_status_update_prohibited_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# 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.cz/property_status_update_prohibited.expected | ||
# | ||
# and regenerate the tests with the following rake task | ||
# | ||
# $ rake genspec:parsers | ||
# | ||
|
||
require 'spec_helper' | ||
require 'whois/record/parser/whois.nic.cz.rb' | ||
|
||
describe Whois::Record::Parser::WhoisNicCz, "property_status_update_prohibited.expected" do | ||
|
||
before(:each) do | ||
file = fixture("responses", "whois.nic.cz/property_status_update_prohibited.txt") | ||
part = Whois::Record::Part.new(:body => File.read(file)) | ||
@parser = klass.new(part) | ||
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 | ||
end |