Commit 68afc84b authored by Stefan Schantl's avatar Stefan Schantl Committed by Michael Tremer

perl: Add test for get_country_name() function.

Signed-off-by: default avatarStefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent b186d83f
......@@ -12,7 +12,7 @@ use warnings;
my $testdb = $ENV{'database'};
my $keyfile = $ENV{'keyfile'};
use Test::More tests => 10;
use Test::More tests => 11;
BEGIN { use_ok('Location') };
#########################
......@@ -65,3 +65,6 @@ ok(@locations != 0, "Test 11 - Get database countries.");
my $network_flag_anycast = &Location::lookup_network_has_flag($db, $address, "LOC_NETWORK_FLAG_ANYCAST");
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");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment