/spec/whois/parsers/responses/whois.nic.gl/gl/status_registered_spec.rb
https://github.com/weppos/whois-parser · Ruby · 90 lines · 75 code · 5 blank · 10 comment · 0 complexity · acb31298870e081eafe3518b8efec5da 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.nic.gl/gl/status_registered.expected
- #
- # and regenerate the tests with the following rake task
- #
- # $ rake spec:generate
- #
- require 'spec_helper'
- require 'whois/parsers/whois.nic.gl.rb'
- describe Whois::Parsers::WhoisNicGl, "status_registered.expected" do
- subject do
- file = fixture("responses", "whois.nic.gl/gl/status_registered.txt")
- part = Whois::Record::Part.new(body: File.read(file))
- described_class.new(part)
- end
- describe "#domain" do
- it do
- expect(subject.domain).to eq("google.gl")
- end
- end
- describe "#domain_id" do
- it do
- expect(subject.domain_id).to eq("Imp669-GL")
- end
- 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("2003-03-11 03:00:00 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("2013-12-02 19:11:52 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("2015-01-01 03:00:00 UTC"))
- end
- end
- describe "#registrar" do
- it do
- expect(subject.registrar).to be_a(Whois::Parser::Registrar)
- expect(subject.registrar.id).to eq(nil)
- expect(subject.registrar.name).to eq("MarkMonitor")
- expect(subject.registrar.organization).to eq(nil)
- expect(subject.registrar.url).to eq("http://www.markmonitor.com")
- end
- end
- describe "#nameservers" do
- it do
- expect(subject.nameservers).to be_a(Array)
- expect(subject.nameservers.size).to eq(2)
- expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver)
- expect(subject.nameservers[0].name).to eq("ns1.google.com")
- expect(subject.nameservers[0].ipv4).to eq(nil)
- expect(subject.nameservers[0].ipv6).to eq(nil)
- expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver)
- expect(subject.nameservers[1].name).to eq("ns2.google.com")
- expect(subject.nameservers[1].ipv4).to eq(nil)
- expect(subject.nameservers[1].ipv6).to eq(nil)
- end
- end
- end