/spec/whois/record/parser/responses/whois.museum/status_registered_spec.rb
Ruby | 71 lines | 56 code | 5 blank | 10 comment | 0 complexity | 0bebd1f082b1350b0bbe7e029098bbbb MD5 | raw file
- # 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.museum/status_registered.expected
- #
- # and regenerate the tests with the following rake task
- #
- # $ rake spec:generate
- #
- require 'spec_helper'
- require 'whois/record/parser/whois.museum.rb'
- describe Whois::Record::Parser::WhoisMuseum, "status_registered.expected" do
- subject do
- file = fixture("responses", "whois.museum/status_registered.txt")
- part = Whois::Record::Part.new(body: File.read(file))
- described_class.new(part)
- end
- describe "#status" do
- it do
- expect(subject.status).to eq(:registered)
- end
- end
- describe "#available?" do
- it do
- expect(subject.available?).to eq(false)
- end
- end
- describe "#registered?" do
- it do
- expect(subject.registered?).to eq(true)
- end
- end
- describe "#created_on" do
- it do
- expect(subject.created_on).to be_a(Time)
- expect(subject.created_on).to eq(Time.parse("2001-11-10 15:23:42 UTC"))
- end
- end
- describe "#updated_on" do
- it do
- expect(subject.updated_on).to be_a(Time)
- expect(subject.updated_on).to eq(Time.parse("2002-04-04 17:48:43 UTC"))
- end
- end
- describe "#expires_on" do
- it do
- expect(subject.expires_on).to be_a(Time)
- expect(subject.expires_on).to eq(Time.parse("2003-07-31 11:00:00 UTC"))
- end
- end
- describe "#nameservers" do
- it do
- expect(subject.nameservers).to be_a(Array)
- expect(subject.nameservers).to have(2).items
- expect(subject.nameservers[0]).to be_a(Whois::Record::Nameserver)
- expect(subject.nameservers[0].name).to eq("nic.museum")
- expect(subject.nameservers[0].ipv4).to eq("130.242.24.5")
- expect(subject.nameservers[0].ipv6).to eq(nil)
- expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver)
- expect(subject.nameservers[1].name).to eq("nic.frd.se")
- expect(subject.nameservers[1].ipv4).to eq(nil)
- expect(subject.nameservers[1].ipv6).to eq(nil)
- end
- end
- end