[4/4] perl: Add test for get_continent_code() function.

Message ID 20200910155747.12553-4-stefan.schantl@ipfire.org
State Not Applicable
Headers
Series [1/4] perl: Add get_country_name() function. |

Commit Message

Stefan Schantl Sept. 10, 2020, 3:57 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 c922a94..e256aec 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 => 11;
+use Test::More tests => 12;
 BEGIN { use_ok('Location') };
 
 #########################
@@ -68,3 +68,6 @@  ok($network_flag_anycast, "Network has Anycast flag.");
 
 my $country_name = &Location::get_country_name($db, "DE");
 ok($country_name eq "Germany", "Test 13 - Got country name: $country_name");
+
+my $continent_code = &Location::get_continent_code($db, "DE");
+ok($continent_code eq "EU", "Test 14 - Got continent code $continent_code for country code 'DE'");