From c29f487ec8dda9b156ae924cc00cc6a72b31a495 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 21 Jan 2014 14:49:44 +0100 Subject: add test cases for imaginary station and no results in timeframe --- t/30-iris-const.t | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 't/30-iris-const.t') diff --git a/t/30-iris-const.t b/t/30-iris-const.t index e82b59c..e8e60ae 100644 --- a/t/30-iris-const.t +++ b/t/30-iris-const.t @@ -4,7 +4,7 @@ use warnings; use 5.014; use DateTime; -use Test::More tests => 4; +use Test::More tests => 5; use Test::Fatal; use Travel::Status::DE::IRIS; @@ -39,6 +39,21 @@ $status = Travel::Status::DE::IRIS->new( ok( defined $status->errstr, 'constructor with missing data has errstr' ); +$status = Travel::Status::DE::IRIS->new( + iris_base => 'file:t/in', + station => 'doesnotexist', + datetime => DateTime->new( + year => 2014, + month => 1, + day => 3, + hour => 19, + minute => 1, + time_zone => 'Europe/Berlin' + ) +); + +ok( defined $status->errstr, 'constructor with imaginary station has errstr' ); + $status = Travel::Status::DE::IRIS->new( iris_base => 'file:t/in', station => 'EBILP', -- cgit v1.2.3