[3/3] perl: Add test for the database_countries() function.

Message ID 20200820172856.6983-3-stefan.schantl@ipfire.org
State Accepted
Commit 084b5bf495b2d7d61cd2fb281f34481bc7a436cc
Headers show
Series
  • [1/3] perl: Add database_countries() function.
Related show

Commit Message

Stefan Schantl Aug. 20, 2020, 5:28 p.m. UTC
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 src/perl/t/Location.t | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/src/perl/t/Location.t b/src/perl/t/Location.t
index 3ba2d8f..ec7f1e0 100644
--- a/src/perl/t/Location.t
+++ b/src/perl/t/Location.t
@@ -12,7 +12,7 @@  use warnings;
 my $testdb = $ENV{'database'};
 my $keyfile = $ENV{'keyfile'};
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 BEGIN { use_ok('Location') };
 
 #########################
@@ -56,3 +56,6 @@  if(defined($as_number)) { fail("Test 8 - Lookup Autonomous System Number for add
 
 $as_number = &Location::lookup_asn($db, "a.b.c.d");
 if(defined($as_number)) { fail("Test 9 - Lookup Autonomous System Number for invalid address.") }
+
+my @locations = &Location::database_countries($db);
+ok(@locations != 0, "Test 10 - Get database countries.");