Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #339 from domainr/fi-reserved
Add 'not available' status to .fi
- Loading branch information
Showing
5 changed files
with
167 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#disclaimer | ||
%s == "More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority" | ||
|
||
|
||
#domain | ||
%s == nil | ||
|
||
#domain_id | ||
%s %ERROR{AttributeNotSupported} | ||
|
||
|
||
#status | ||
%s == :reserved | ||
|
||
#available? | ||
%s == false | ||
|
||
#reserved? | ||
%s == true | ||
|
||
|
||
#created_on | ||
%s == nil | ||
|
||
#updated_on | ||
%s == nil | ||
|
||
#expires_on | ||
%s == nil | ||
|
||
|
||
#registrar | ||
%s %ERROR{AttributeNotSupported} | ||
|
||
#registrant_contacts | ||
%s %CLASS{array} | ||
%s == [] | ||
|
||
#admin_contacts | ||
%s %ERROR{AttributeNotSupported} | ||
|
||
#technical_contacts | ||
%s %ERROR{AttributeNotSupported} | ||
|
||
|
||
#nameservers | ||
%s %CLASS{array} | ||
%s == [] |
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,6 @@ | ||
|
||
Domain not available | ||
|
||
More information is available at https://domain.fi/ | ||
Copyright (c) Finnish Communications Regulatory Authority | ||
|
96 changes: 96 additions & 0 deletions
96
spec/whois/record/parser/responses/whois.fi/status_reserved_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,96 @@ | ||
# 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.fi/status_reserved.expected | ||
# | ||
# and regenerate the tests with the following rake task | ||
# | ||
# $ rake spec:generate | ||
# | ||
|
||
require 'spec_helper' | ||
require 'whois/record/parser/whois.fi.rb' | ||
|
||
describe Whois::Record::Parser::WhoisFi, "status_reserved.expected" do | ||
|
||
subject do | ||
file = fixture("responses", "whois.fi/status_reserved.txt") | ||
part = Whois::Record::Part.new(body: File.read(file)) | ||
described_class.new(part) | ||
end | ||
|
||
describe "#disclaimer" do | ||
it do | ||
expect(subject.disclaimer).to eq("More information is available at https://domain.fi/\nCopyright (c) Finnish Communications Regulatory Authority") | ||
end | ||
end | ||
describe "#domain" do | ||
it do | ||
expect(subject.domain).to eq(nil) | ||
end | ||
end | ||
describe "#domain_id" do | ||
it do | ||
expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported) | ||
end | ||
end | ||
describe "#status" do | ||
it do | ||
expect(subject.status).to eq(:reserved) | ||
end | ||
end | ||
describe "#available?" do | ||
it do | ||
expect(subject.available?).to eq(false) | ||
end | ||
end | ||
describe "#reserved?" do | ||
it do | ||
expect(subject.reserved?).to eq(true) | ||
end | ||
end | ||
describe "#created_on" do | ||
it do | ||
expect(subject.created_on).to eq(nil) | ||
end | ||
end | ||
describe "#updated_on" do | ||
it do | ||
expect(subject.updated_on).to eq(nil) | ||
end | ||
end | ||
describe "#expires_on" do | ||
it do | ||
expect(subject.expires_on).to eq(nil) | ||
end | ||
end | ||
describe "#registrar" do | ||
it do | ||
expect { subject.registrar }.to raise_error(Whois::AttributeNotSupported) | ||
end | ||
end | ||
describe "#registrant_contacts" do | ||
it do | ||
expect(subject.registrant_contacts).to be_a(Array) | ||
expect(subject.registrant_contacts).to eq([]) | ||
end | ||
end | ||
describe "#admin_contacts" do | ||
it do | ||
expect { subject.admin_contacts }.to raise_error(Whois::AttributeNotSupported) | ||
end | ||
end | ||
describe "#technical_contacts" do | ||
it do | ||
expect { subject.technical_contacts }.to raise_error(Whois::AttributeNotSupported) | ||
end | ||
end | ||
describe "#nameservers" do | ||
it do | ||
expect(subject.nameservers).to be_a(Array) | ||
expect(subject.nameservers).to eq([]) | ||
end | ||
end | ||
end |