-
-
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.
Shift company when it is injected into the address
- Loading branch information
Showing
3 changed files
with
75 additions
and
1 deletion.
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
13 changes: 13 additions & 0 deletions
13
spec/fixtures/responses/whois.nic.it/property_contact_with_company_in_address.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,13 @@ | ||
#technical_contact | ||
should: %s be_a(_contact) | ||
should: %s.type == Whois::Answer::Contact::TYPE_TECHNICAL | ||
should: %s.id == "AARS1-ITNIC" | ||
should: %s.name == "Andrea Antonio Renato Stratta" | ||
should: %s.organization == "UCI Italia Srl" | ||
should: %s.address == "Via E. Fermi, 161" | ||
should: %s.city == "Roma" | ||
should: %s.zip == "00146" | ||
should: %s.state == "RM" | ||
should: %s.country_code == "IT" | ||
should: %s.created_on == Time.parse("2006-08-16 00:00:00") | ||
should: %s.updated_on == Time.parse("2007-03-01 07:48:42") |
60 changes: 60 additions & 0 deletions
60
...ois/answer/parser/responses/whois.nic.it/property_contact_with_company_in_address_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,60 @@ | ||
# This file is autogenerated. Do not edit it manually. | ||
# If you want change the content of this file, edit | ||
# | ||
# /spec/whois/answer/parser/responses/whois.nic.it/property_contact_with_company_in_address_spec.rb | ||
# | ||
# and regenerate the tests with the following rake task | ||
# | ||
# $ rake genspec:parsers | ||
# | ||
|
||
require 'spec_helper' | ||
require 'whois/answer/parser/whois.nic.it' | ||
|
||
describe Whois::Answer::Parser::WhoisNicIt, "property_contact_with_company_in_address.expected" do | ||
|
||
before(:each) do | ||
file = fixture("responses", "whois.nic.it/property_contact_with_company_in_address.txt") | ||
part = Whois::Answer::Part.new(:body => File.read(file)) | ||
@parser = klass.new(part) | ||
end | ||
|
||
context "#technical_contact" do | ||
it do | ||
@parser.technical_contact.should be_a(_contact) | ||
end | ||
it do | ||
@parser.technical_contact.type.should == Whois::Answer::Contact::TYPE_TECHNICAL | ||
end | ||
it do | ||
@parser.technical_contact.id.should == "AARS1-ITNIC" | ||
end | ||
it do | ||
@parser.technical_contact.name.should == "Andrea Antonio Renato Stratta" | ||
end | ||
it do | ||
@parser.technical_contact.organization.should == "UCI Italia Srl" | ||
end | ||
it do | ||
@parser.technical_contact.address.should == "Via E. Fermi, 161" | ||
end | ||
it do | ||
@parser.technical_contact.city.should == "Roma" | ||
end | ||
it do | ||
@parser.technical_contact.zip.should == "00146" | ||
end | ||
it do | ||
@parser.technical_contact.state.should == "RM" | ||
end | ||
it do | ||
@parser.technical_contact.country_code.should == "IT" | ||
end | ||
it do | ||
@parser.technical_contact.created_on.should == Time.parse("2006-08-16 00:00:00") | ||
end | ||
it do | ||
@parser.technical_contact.updated_on.should == Time.parse("2007-03-01 07:48:42") | ||
end | ||
end | ||
end |