Sha256: 18878ddd60df667fab5cf444777f7100a26e8f03cba7700d049ef364dd988253

Contents?: true

Size: 537 Bytes

Versions: 13

Compression:

Stored size: 537 Bytes

Contents

require 'test_helper'

class ServerAdaptersNoneTest < Test::Unit::TestCase
  include Whois

  def setup
    @klass = Server::Adapters::None
  end

  def test_query
    @server = @klass.new(:tld, ".foo", nil, {})
    error = assert_raise(NoInterfaceError) { @server.query("domain.foo") }
    assert_match /tld/, error.message
  end

  def test_query_with_ipv4
    @server = @klass.new(:ipv4, "127.0.0.1", nil, {})
    error = assert_raise(NoInterfaceError) { @server.query("domain.foo") }
    assert_match /ipv4/, error.message
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
whois-1.0.5 test/server/adapters/none_test.rb
whois-1.0.4 test/server/adapters/none_test.rb
whois-1.0.3 test/server/adapters/none_test.rb
whois-1.0.2 test/server/adapters/none_test.rb
whois-1.0.1 test/server/adapters/none_test.rb
whois-1.0.0 test/server/adapters/none_test.rb
whois-0.9.0 test/server/adapters/none_test.rb
whois-0.8.1 test/server/adapters/none_test.rb
whois-0.8.0 test/server/adapters/none_test.rb
whois-0.5.3 test/adapters/none_test.rb
whois-0.5.2 test/adapters/none_test.rb
whois-0.5.0 test/adapters/none_test.rb
whois-0.5.1 test/adapters/none_test.rb