summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-07-13 16:03:00 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-07-13 16:03:00 +0200
commit54943f4f6ec0db570f8fe57fb28a5e3ea6472dc8 (patch)
treeac81b3fb995cbbdddb1017ad10b0576ee36d77e8 /t
parent91a31f674b366d4e86a6bfae12c0922c396a7df1 (diff)
DeutscheBahn/Result: route_interesting adjustment, add tests for it
Diffstat (limited to 't')
-rw-r--r--t/20-db.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/20-db.t b/t/20-db.t
index 118c6cc..1429024 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 => 90;
+use Test::More tests => 93;
BEGIN {
use_ok('Travel::Status::DE::DeutscheBahn');
@@ -44,3 +44,15 @@ is_deeply([$departures[8]->route],
['Essen-Borbeck', 'Bottrop Hbf', 'Gladbeck West', 'Gladbeck-Zweckel',
'Feldhausen', 'Dorsten', 'Hervest-Dorsten', 'Deuten', 'Rhade',
'Marbeck-Heiden', 'Borken(Westf)'], '9th result: route ok');
+
+is_deeply([$departures[5]->route_interesting(3)],
+ ['Essen-Steele', 'Essen-Steele Ost', 'Bochum'],
+ '6th result: route_interesting(3) ok');
+
+is_deeply([$departures[7]->route_interesting(3)],
+ ['Wattenscheid', 'Bochum', 'Dortmund'],
+ '8th result: route_interesting(3) ok');
+
+is_deeply([$departures[10]->route_interesting(5)],
+ [qw[Wattenscheid Bochum Witten Hagen]],
+ '11th result: route_interesting(5) ok');