Sha256: 2f997574bd7d03b8acb60a3998971eb68d46769435ab69c5ca6b6518b3717521

Contents?: true

Size: 1.63 KB

Versions: 5

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

  context "#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

5 entries across 5 versions & 1 rubygems

Version Path
whois-2.0.4 spec/whois/record/parser/responses/whois.nic.it/property_contact_with_organization_spec.rb
whois-2.0.3 spec/whois/record/parser/responses/whois.nic.it/property_contact_with_organization_spec.rb
whois-2.0.2 spec/whois/record/parser/responses/whois.nic.it/property_contact_with_organization_spec.rb
whois-2.0.1 spec/whois/record/parser/responses/whois.nic.it/property_contact_with_organization_spec.rb
whois-2.0.0 spec/whois/record/parser/responses/whois.nic.it/property_contact_with_organization_spec.rb