From 2c05b8fc1754ecf27a67f62971570da909e19b94 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 21 Jan 2014 14:42:32 +0100 Subject: stations test: make sure get_stations has no empty pairs --- t/21-iris-stations.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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') ], -- cgit v1.2.3