Sha256: a61a8ffdf035d865463ed53e20c5e920ff849c8ac7e5095f49901ca8f4cc8dba

Contents?: true

Size: 616 Bytes

Versions: 3

Compression:

Stored size: 616 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Whois::Server::Adapters::Web do
  before 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

3 entries across 3 versions & 1 rubygems

Version Path
whois-6.0.0 spec/whois/server/adapters/web_spec.rb
whois-5.1.1 spec/whois/server/adapters/web_spec.rb
whois-5.1.0 spec/whois/server/adapters/web_spec.rb