-
-
Notifications
You must be signed in to change notification settings - Fork 283
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 should support multiple status (closes GH-190).
- Loading branch information
Showing
5 changed files
with
60 additions
and
6 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
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_expired_and_more.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,8 @@ | |||
#status | |||
should: %s == :expired | |||
|
|||
#available? | |||
should: %s == false | |||
|
|||
#registered? | |||
should: %s == true |
39 changes: 39 additions & 0 deletions
39
spec/whois/record/parser/responses/whois.nic.cz/property_status_expired_and_more_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 | Original file line | 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_expired_and_more.expected | |||
# | |||
# and regenerate the tests with the following rake task | |||
# | |||
# $ rake spec:generate | |||
# | |||
|
|||
require 'spec_helper' | |||
require 'whois/record/parser/whois.nic.cz.rb' | |||
|
|||
describe Whois::Record::Parser::WhoisNicCz, "property_status_expired_and_more.expected" do | |||
|
|||
subject do | |||
file = fixture("responses", "whois.nic.cz/property_status_expired_and_more.txt") | |||
part = Whois::Record::Part.new(:body => File.read(file)) | |||
described_class.new(part) | |||
end | |||
|
|||
describe "#status" do | |||
it do | |||
subject.status.should == :expired | |||
end | |||
end | |||
describe "#available?" do | |||
it do | |||
subject.available?.should == false | |||
end | |||
end | |||
describe "#registered?" do | |||
it do | |||
subject.registered?.should == true | |||
end | |||
end | |||
end |