Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update ARIN specs to account for query parameters.

  • Loading branch information...
commit ee54b97f75872c8a95e7629ef6c27d3244d8e382 1 parent 1cad6b1
@linrock authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 spec/whois/server/adapters/arin_spec.rb
View
16 spec/whois/server/adapters/arin_spec.rb
@@ -10,7 +10,7 @@
it "returns the WHOIS record" do
response = "Whois Response"
expected = response
- server.query_handler.expects(:call).with("0.0.0.0", "whois.arin.net", 43).returns(response)
+ server.query_handler.expects(:call).with("n + 0.0.0.0", "whois.arin.net", 43).returns(response)
record = server.lookup("0.0.0.0")
record.to_s.should == expected
record.parts.should have(1).part
@@ -23,8 +23,8 @@
referral = File.read(fixture("referrals/arin_referral_whois.txt"))
response = "Whois Response"
expected = referral + "\n" + response
- server.query_handler.expects(:call).with("0.0.0.0", "whois.arin.net", 43).returns(referral)
- server.query_handler.expects(:call).with("0.0.0.0", "whois.ripe.net", 43).returns(response)
+ server.query_handler.expects(:call).with("n + 0.0.0.0", "whois.arin.net", 43).returns(referral)
+ server.query_handler.expects(:call).with("n + 0.0.0.0", "whois.ripe.net", 43).returns(response)
record = server.lookup("0.0.0.0")
record.to_s.should == expected
@@ -37,8 +37,8 @@
referral = File.read(fixture("referrals/arin_referral_rwhois.txt"))
response = "Whois Response"
expected = referral + "\n" + response
- server.query_handler.expects(:call).with("0.0.0.0", "whois.arin.net", 43).returns(referral)
- server.query_handler.expects(:call).with("0.0.0.0", "rwhois.servernap.net", 4321).returns(response)
+ server.query_handler.expects(:call).with("n + 0.0.0.0", "whois.arin.net", 43).returns(referral)
+ server.query_handler.expects(:call).with("n + 0.0.0.0", "rwhois.servernap.net", 4321).returns(response)
record = server.lookup("0.0.0.0")
record.to_s.should == expected
@@ -50,8 +50,8 @@
it "ignores referral if options[:referral] is false" do
referral = File.read(fixture("referrals/arin_referral_whois.txt"))
server.options[:referral] = false
- server.query_handler.expects(:call).with("0.0.0.0", "whois.arin.net", 43).returns(referral)
- server.query_handler.expects(:call).with("0.0.0.0", "whois.ripe.net", 43).never
+ server.query_handler.expects(:call).with("n + 0.0.0.0", "whois.arin.net", 43).returns(referral)
+ server.query_handler.expects(:call).with("n + 0.0.0.0", "whois.ripe.net", 43).never
record = server.lookup("0.0.0.0")
record.parts.should have(1).part
@@ -59,7 +59,7 @@
it "ignores referral (gracefully) if missing" do
referral = File.read(fixture("referrals/arin_referral_missing.txt"))
- server.query_handler.expects(:call).with("0.0.0.0", "whois.arin.net", 43).returns(referral)
+ server.query_handler.expects(:call).with("n + 0.0.0.0", "whois.arin.net", 43).returns(referral)
server.query_handler.expects(:call).never
record = server.lookup("0.0.0.0")
Please sign in to comment.
Something went wrong with that request. Please try again.