tests: fix broken tests.

* Fix a bug where creating posts failed if IQDB wasn't configured.
* Fix broken Skeb test caused by changed URL.
* Fix broken IP geolocation tests caused by API returning different data.
* Fix broken post regeneration tests.
This commit is contained in:
evazion
2022-01-31 14:14:09 -06:00
parent 65b7c08e33
commit 2bb5ad78fb
4 changed files with 11 additions and 9 deletions

View File

@@ -57,13 +57,13 @@ class IpGeolocationTest < ActiveSupport::TestCase
should "work for a proxy IP" do
@ip = IpGeolocation.create_or_update!("31.214.184.59")
assert_equal("Soluciones Corporativas IP, SL", @ip.organization)
assert_match(/Soluciones Corporativas IP, SL/i, @ip.organization.downcase)
assert_equal(true, @ip.is_proxy?)
end
should "work for a cloud hosting IP" do
@ip = IpGeolocation.create_or_update!("157.230.244.215")
assert_equal("DigitalOcean, LLC", @ip.organization)
assert_match(/DigitalOcean, LLC/i, @ip.organization)
assert_equal(true, @ip.is_proxy?)
end