summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-10-23 20:26:35 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-10-23 20:26:35 +0200
commitac7abb4f0b8cce981856d4d109043c9904ffa9b5 (patch)
tree2f8ebca27466c535a22c4777e2049c7b37061231
parent97b69fa604570bc51b61056adb7270fc536f9fa5 (diff)
update tests
-rwxr-xr-xt/20-db.t14
1 files changed, 1 insertions, 13 deletions
diff --git a/t/20-db.t b/t/20-db.t
index 5857920..8512777 100755
--- a/t/20-db.t
+++ b/t/20-db.t
@@ -7,7 +7,7 @@ use utf8;
use File::Slurp qw(read_file);
use JSON;
-use Test::More tests => 58;
+use Test::More tests => 46;
use Travel::Status::DE::HAFAS;
@@ -35,7 +35,6 @@ my @results = $status->results;
# Result 0: Bus
-is( $results[0]->date, '02.10.2022', 'result 0: date' );
is(
$results[0]->datetime->strftime('%Y%m%d %H%M%S'),
'20221002 170500',
@@ -59,19 +58,15 @@ for my $res ( $results[0]->route_end, $results[0]->destination ) {
is( $res, 'Philharmonie Süd, Berlin', 'result 0: route start/end' );
}
-is( $results[0]->sched_date, '02.10.2022', 'result 0: sched_date' );
is(
$results[0]->sched_datetime->strftime('%Y%m%d %H%M%S'),
'20221002 165500',
'result 0: sched_datetime'
);
-is( $results[0]->sched_time, '16:55', 'result 0: sched_time' );
-is( $results[0]->time, '17:05', 'result 0: time' );
is( $results[0]->type, 'Bus', 'result 0: type' );
# Result 2: U-Bahn
-is( $results[2]->date, '02.10.2022', 'result 2: date' );
is(
$results[2]->datetime->strftime('%Y%m%d %H%M%S'),
'20221002 170000',
@@ -95,19 +90,15 @@ for my $res ( $results[2]->route_end, $results[2]->destination ) {
is( $res, 'Hermannstr. (S+U), Berlin', 'result 2: route start/end' );
}
-is( $results[2]->sched_date, '02.10.2022', 'result 2: sched_date' );
is(
$results[2]->sched_datetime->strftime('%Y%m%d %H%M%S'),
'20221002 170000',
'result 2: sched_datetime'
);
-is( $results[2]->sched_time, '17:00', 'result 2: sched_time' );
-is( $results[2]->time, '17:00', 'result 2: time' );
is( $results[2]->type, 'U', 'result 2: type' );
# Result 3: S-Bahn
-is( $results[3]->date, '02.10.2022', 'result 3: date' );
is(
$results[3]->datetime->strftime('%Y%m%d %H%M%S'),
'20221002 170100',
@@ -131,12 +122,9 @@ for my $res ( $results[3]->route_end, $results[3]->destination ) {
is( $res, 'Berlin-Spandau (S)', 'result 3: route start/end' );
}
-is( $results[3]->sched_date, '02.10.2022', 'result 3: sched_date' );
is(
$results[3]->sched_datetime->strftime('%Y%m%d %H%M%S'),
'20221002 170100',
'result 3: sched_datetime'
);
-is( $results[3]->sched_time, '17:01', 'result 3: sched_time' );
-is( $results[3]->time, '17:01', 'result 3: time' );
is( $results[3]->type, 'S', 'result 3: type' );