tests: fix test failures when running without API keys.

Fix the test suite failing when trying to run it in the default state
with no config file or API keys configured. Most source sites require
API keys or login credentials to be set in order to work. Skip these
tests when credentials aren't configured.
This commit is contained in:
evazion
2021-09-22 03:49:05 -05:00
parent 3a05b7e832
commit ac12efb636
12 changed files with 54 additions and 3 deletions

View File

@@ -1,6 +1,10 @@
require 'test_helper'
class IpGeolocationTest < ActiveSupport::TestCase
setup do
skip "IP Registry credentials not configured" unless IpLookup.enabled?
end
context "IpGeolocation: " do
context "the create_or_update! method" do
should "create a new record if the IP record doesn't already exist" do