summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-01-21 14:42:32 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-01-21 14:42:32 +0100
commit2c05b8fc1754ecf27a67f62971570da909e19b94 (patch)
treef09d25caa6e47f6fb653f14ccf76e375ebc51fbc
parent6e7e2d798651560c940e58f68d8d7fb79d18670b (diff)
stations test: make sure get_stations has no empty pairs
-rw-r--r--t/21-iris-stations.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/21-iris-stations.t b/t/21-iris-stations.t
index 0443989..55938c4 100644
--- a/t/21-iris-stations.t
+++ b/t/21-iris-stations.t
@@ -3,13 +3,18 @@ use strict;
use warnings;
use 5.014;
-use Test::More tests => 10;
+use Test::More tests => 11;
BEGIN {
use_ok('Travel::Status::DE::IRIS::Stations');
}
require_ok('Travel::Status::DE::IRIS::Stations');
+my @emptypairs = grep { not (length($_->[0]) and length($_->[1])) }
+ Travel::Status::DE::IRIS::Stations::get_stations;
+
+is_deeply(\@emptypairs, [], 'no stations with empty code / name');
+
is_deeply(
[],
[ Travel::Status::DE::IRIS::Stations::get_station('doesnotexist') ],