Last active
October 11, 2015 16:19
-
-
Save paveljurca/57deec705e09ac4070fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test::More tests => 1; | |
use strict; | |
use warnings; | |
use Data::Types qw/:float/; | |
# module loaded | |
use_ok('Airport::Data'); | |
# fixture | |
my $airports_ref = Airport::Data::parse_airports('t/data/airports1.csv'); | |
=head2 @Test | |
data validity | |
=cut | |
for my $air (@{ $airports_ref }) { | |
# expected values are non empty | |
ok(exists $air->{$_} and $air->{$_} =~ /\S+/) | |
for (qw/id name latitude_deg longitude_deg iata_code/); | |
# latitude and longitude are floats | |
ok(is_float($air->{$_}), 'floating point') | |
for (qw/latitude_deg longitude_deg/); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment