Sha256: d08ce1a4e9dfd0e2ad8a6c383b568ad47b4a4632988941f00c31f204303c64ae

Contents?: true

Size: 623 Bytes

Versions: 1

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Whois::Server::Adapters::Web do
  before(:each) do
    @definition = [:tld, ".test", nil, { url: "http://whois.test" }]
  end


  describe "#lookup" do
    it "raises Whois::WebInterfaceError" do
      expect {
        described_class.new(*@definition).lookup("example.test")
      }.to raise_error(Whois::WebInterfaceError)
    end

    it "customizes the error message with the WHOIS web url" do
      expect {
        described_class.new(*@definition).lookup("example.test")
      }.to raise_error(Whois::WebInterfaceError, /whois\.test/)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whois-5.0.2 spec/whois/server/adapters/web_spec.rb