PageRenderTime 50ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/spec/whois/record/parser/responses/whois.godaddy.com/status_registered_spec.rb

https://gitlab.com/dandrews/whois
Ruby | 126 lines | 111 code | 5 blank | 10 comment | 0 complexity | 4276583d64879d2ffdf5f0c666c27a0a MD5 | raw file
  1. # encoding: utf-8
  2. # This file is autogenerated. Do not edit it manually.
  3. # If you want change the content of this file, edit
  4. #
  5. # /spec/fixtures/responses/whois.godaddy.com/status_registered.expected
  6. #
  7. # and regenerate the tests with the following rake task
  8. #
  9. # $ rake spec:generate
  10. #
  11. require 'spec_helper'
  12. require 'whois/record/parser/whois.godaddy.com.rb'
  13. describe Whois::Record::Parser::WhoisGodaddyCom, "status_registered.expected" do
  14. subject do
  15. file = fixture("responses", "whois.godaddy.com/status_registered.txt")
  16. part = Whois::Record::Part.new(body: File.read(file))
  17. described_class.new(part)
  18. end
  19. describe "#status" do
  20. it do
  21. expect { subject.status }.to raise_error(Whois::AttributeNotSupported)
  22. end
  23. end
  24. describe "#available?" do
  25. it do
  26. expect(subject.available?).to eq(false)
  27. end
  28. end
  29. describe "#registered?" do
  30. it do
  31. expect(subject.registered?).to eq(true)
  32. end
  33. end
  34. describe "#registrar" do
  35. it do
  36. expect(subject.registrar).to be_a(Whois::Record::Registrar)
  37. expect(subject.registrar.id).to eq(nil)
  38. expect(subject.registrar.name).to eq("GoDaddy.com, LLC")
  39. expect(subject.registrar.organization).to eq(nil)
  40. expect(subject.registrar.url).to eq("http://www.godaddy.com")
  41. end
  42. end
  43. describe "#registrant_contacts" do
  44. it do
  45. expect(subject.registrant_contacts).to be_a(Array)
  46. expect(subject.registrant_contacts).to have(1).items
  47. expect(subject.registrant_contacts[0]).to be_a(Whois::Record::Contact)
  48. expect(subject.registrant_contacts[0].type).to eq(Whois::Record::Contact::TYPE_REGISTRANT)
  49. expect(subject.registrant_contacts[0].name).to eq("Go Daddy Go Daddy")
  50. expect(subject.registrant_contacts[0].organization).to eq("Go Daddy")
  51. expect(subject.registrant_contacts[0].address).to eq("14455 N Hayden Rd Suite 219")
  52. expect(subject.registrant_contacts[0].city).to eq("Scottsdale")
  53. expect(subject.registrant_contacts[0].zip).to eq("85260")
  54. expect(subject.registrant_contacts[0].state).to eq("Arizona")
  55. expect(subject.registrant_contacts[0].country).to eq("United States")
  56. expect(subject.registrant_contacts[0].phone).to eq(nil)
  57. expect(subject.registrant_contacts[0].fax).to eq(nil)
  58. expect(subject.registrant_contacts[0].email).to eq(nil)
  59. expect(subject.registrant_contacts[0].created_on).to eq(nil)
  60. expect(subject.registrant_contacts[0].updated_on).to eq(nil)
  61. end
  62. end
  63. describe "#admin_contacts" do
  64. it do
  65. expect(subject.admin_contacts).to be_a(Array)
  66. expect(subject.admin_contacts).to have(1).items
  67. expect(subject.admin_contacts[0]).to be_a(Whois::Record::Contact)
  68. expect(subject.admin_contacts[0].type).to eq(Whois::Record::Contact::TYPE_ADMINISTRATIVE)
  69. expect(subject.admin_contacts[0].name).to eq("Go Daddy Go Daddy")
  70. expect(subject.admin_contacts[0].organization).to eq("Go Daddy")
  71. expect(subject.admin_contacts[0].address).to eq("14455 N Hayden Rd Suite 219")
  72. expect(subject.admin_contacts[0].city).to eq("Scottsdale")
  73. expect(subject.admin_contacts[0].zip).to eq("85260")
  74. expect(subject.admin_contacts[0].state).to eq("Arizona")
  75. expect(subject.admin_contacts[0].country).to eq("United States")
  76. expect(subject.admin_contacts[0].phone).to eq("+1.4805058800")
  77. expect(subject.admin_contacts[0].fax).to eq("+1.4805058844")
  78. expect(subject.admin_contacts[0].email).to eq("dns@jomax.net")
  79. expect(subject.admin_contacts[0].created_on).to eq(nil)
  80. expect(subject.admin_contacts[0].updated_on).to eq(nil)
  81. end
  82. end
  83. describe "#technical_contacts" do
  84. it do
  85. expect(subject.technical_contacts).to be_a(Array)
  86. expect(subject.technical_contacts).to have(1).items
  87. expect(subject.technical_contacts[0]).to be_a(Whois::Record::Contact)
  88. expect(subject.technical_contacts[0].type).to eq(Whois::Record::Contact::TYPE_TECHNICAL)
  89. expect(subject.technical_contacts[0].name).to eq("Go Daddy Go Daddy")
  90. expect(subject.technical_contacts[0].organization).to eq("Go Daddy")
  91. expect(subject.technical_contacts[0].address).to eq("14455 N Hayden Rd Suite 219")
  92. expect(subject.technical_contacts[0].city).to eq("Scottsdale")
  93. expect(subject.technical_contacts[0].zip).to eq("85260")
  94. expect(subject.technical_contacts[0].state).to eq("Arizona")
  95. expect(subject.technical_contacts[0].country).to eq("United States")
  96. expect(subject.technical_contacts[0].phone).to eq("+1.4805058800")
  97. expect(subject.technical_contacts[0].fax).to eq("+1.4805058844")
  98. expect(subject.technical_contacts[0].email).to eq("dns@jomax.net")
  99. expect(subject.technical_contacts[0].created_on).to eq(nil)
  100. expect(subject.technical_contacts[0].updated_on).to eq(nil)
  101. end
  102. end
  103. describe "#nameservers" do
  104. it do
  105. expect(subject.nameservers).to be_a(Array)
  106. expect(subject.nameservers).to have(3).items
  107. expect(subject.nameservers[0]).to be_a(Whois::Record::Nameserver)
  108. expect(subject.nameservers[0].name).to eq("CNS1.SECURESERVER.NET")
  109. expect(subject.nameservers[0].ipv4).to eq(nil)
  110. expect(subject.nameservers[0].ipv6).to eq(nil)
  111. expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver)
  112. expect(subject.nameservers[1].name).to eq("CNS2.SECURESERVER.NET")
  113. expect(subject.nameservers[1].ipv4).to eq(nil)
  114. expect(subject.nameservers[1].ipv6).to eq(nil)
  115. expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver)
  116. expect(subject.nameservers[2].name).to eq("CNS3.SECURESERVER.NET")
  117. expect(subject.nameservers[2].ipv4).to eq(nil)
  118. expect(subject.nameservers[2].ipv6).to eq(nil)
  119. end
  120. end
  121. end