Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Query object should match server

  • Loading branch information...
commit 24a1ed7f476a47d9070a5ae9ba8d6e2189990186 1 parent b3c7ebc
@weppos authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 spec/whois/client_spec.rb
View
12 spec/whois/client_spec.rb
@@ -81,10 +81,10 @@ def query(*args)
sleep(2)
end
end
- Whois::Server.expects(:guess).returns(adapter.new(:tld, ".test", "example.test"))
+ Whois::Server.expects(:guess).returns(adapter.new(:tld, ".test", "whois.test"))
client = klass.new(:timeout => 1)
- lambda { client.query("foo.com") }.should raise_error(Timeout::Error)
+ lambda { client.query("example.test") }.should raise_error(Timeout::Error)
end
it "does not raise if timeout is not exceeded" do
@@ -93,10 +93,10 @@ def query(*args)
sleep(1)
end
end
- Whois::Server.expects(:guess).returns(adapter.new(:tld, ".test", "example.test"))
+ Whois::Server.expects(:guess).returns(adapter.new(:tld, ".test", "whois.test"))
client = klass.new(:timeout => 5)
- lambda { client.query("foo.com") }.should_not raise_error
+ lambda { client.query("example.test") }.should_not raise_error
end
it "supports unlimited timeout" do
@@ -105,10 +105,10 @@ def query(*args)
sleep(1)
end
end
- Whois::Server.expects(:guess).returns(adapter.new(:tld, ".test", "example.test"))
+ Whois::Server.expects(:guess).returns(adapter.new(:tld, ".test", "whois.test"))
client = klass.new.tap { |c| c.timeout = nil }
- lambda { client.query("foo.com") }.should_not raise_error
+ lambda { client.query("example.test") }.should_not raise_error
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.