summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-07-13 16:06:46 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-07-13 16:06:46 +0200
commitc679a589c39d7a727b43d7e81d64c5e8fcd4a97b (patch)
treefaa612747c717715d1d19159716e922058d56f96
parent54943f4f6ec0db570f8fe57fb28a5e3ea6472dc8 (diff)
DeutscheBahn/Result: Add ->delay tests
-rw-r--r--t/20-db.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/20-db.t b/t/20-db.t
index 1429024..8b66ff9 100644
--- a/t/20-db.t
+++ b/t/20-db.t
@@ -4,7 +4,7 @@ use warnings;
use 5.010;
use File::Slurp qw(slurp);
-use Test::More tests => 93;
+use Test::More tests => 96;
BEGIN {
use_ok('Travel::Status::DE::DeutscheBahn');
@@ -30,6 +30,7 @@ is($departures[0]->time, '19:21', 'first result: time ok');
is($departures[0]->train, 'RE 10228', 'first result: train ok');
is($departures[0]->destination, 'Duisburg Hbf', 'first result: destination ok');
is($departures[0]->platform, '2', 'first result: platform ok');
+is($departures[0]->delay, 0, 'first result: delay ok');
is($departures[-1]->time, '20:18', 'last result: time ok');
is($departures[-1]->train, 'S 6', 'last result: train ok');
@@ -39,6 +40,9 @@ is($departures[8]->time, '19:31', '9th result: time ok');
is($departures[8]->train, 'NWB75366', '9th result: train ok');
is($departures[8]->info_raw, 'k.A.', '9th result: info_raw ok');
is($departures[8]->info, q{}, '9th result: info ok');
+is($departures[8]->delay, undef, '9th result: delay ok');
+
+is($departures[15]->delay, 15, '16th result: delay ok');
is_deeply([$departures[8]->route],
['Essen-Borbeck', 'Bottrop Hbf', 'Gladbeck West', 'Gladbeck-Zweckel',