Sha256: 443b0d1d4394a2dd21dcc25e8e136cf475e2e720bd7f889ad452cdfbf0a7b106

Contents?: true

Size: 1.63 KB

Versions: 4

Compression:

Stored size: 1.63 KB

Contents

# 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.it/property_contact_with_organization.expected
#
# and regenerate the tests with the following rake task
#
#   $ rake genspec:parsers
#

require 'spec_helper'
require 'whois/record/parser/whois.nic.it.rb'

describe Whois::Record::Parser::WhoisNicIt, "property_contact_with_organization.expected" do

  before(:each) do
    file = fixture("responses", "whois.nic.it/property_contact_with_organization.txt")
    part = Whois::Record::Part.new(:body => File.read(file))
    @parser = klass.new(part)
  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(_contact)
      @parser.admin_contacts[0].type.should         == Whois::Record::Contact::TYPE_ADMIN
      @parser.admin_contacts[0].id.should           == "TT4277-ITNIC"
      @parser.admin_contacts[0].name.should         == "Tsao Tu"
      @parser.admin_contacts[0].organization.should == "Tu Tsao"
      @parser.admin_contacts[0].address.should      == "30 Herbert Street"
      @parser.admin_contacts[0].city.should         == "Dublin"
      @parser.admin_contacts[0].zip.should          == "2"
      @parser.admin_contacts[0].state.should        == "IE"
      @parser.admin_contacts[0].country_code.should == "IE"
      @parser.admin_contacts[0].created_on.should   == Time.parse("2008-11-27 16:47:22")
      @parser.admin_contacts[0].updated_on.should   == Time.parse("2008-11-27 16:47:22")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
whois-2.1.0 spec/whois/record/parser/responses/whois.nic.it/property_contact_with_organization_spec.rb
whois-2.0.7 spec/whois/record/parser/responses/whois.nic.it/property_contact_with_organization_spec.rb
whois-2.0.6 spec/whois/record/parser/responses/whois.nic.it/property_contact_with_organization_spec.rb
whois-2.0.5 spec/whois/record/parser/responses/whois.nic.it/property_contact_with_organization_spec.rb