test/google_test.rb in legitbot-1.6.0 vs test/google_test.rb in legitbot-1.6.1
- old
+ new
@@ -10,34 +10,34 @@
include DnsServerMock
def test_malicious_ip
ip = '149.210.164.47'
match = Legitbot::Google.new ip
- refute match.valid?
+ refute_predicate match, :valid?
end
def test_valid_ip
ip = '66.249.64.141'
match = Legitbot::Google.new ip
- assert match.valid?
+ assert_predicate match, :valid?
end
def test_malicious_ua
bot = Legitbot.bot(
'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
'149.210.164.47'
)
assert bot
- refute bot.valid?
+ refute_predicate bot, :valid?
end
def test_valid_ua
bot = Legitbot.bot(
'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
'66.249.64.141'
)
assert bot
- assert bot.valid?
+ assert_predicate bot, :valid?
end
def test_valid_name
bot = Legitbot.bot(
'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',