summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-01-22 11:53:01 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-01-22 11:53:01 +0100
commit8d952e1b3a40d59d95e827aee419b3bf79194cb9 (patch)
tree4a14be14a716bb94068749ee43712ee5ef7f1143 /t
parentf0fba026a14cbee4af4d033244237d257aeaa15c (diff)
use predefined datetime for tests
Diffstat (limited to 't')
-rw-r--r--t/20-aseag.t16
-rw-r--r--t/22-results-via.t8
2 files changed, 24 insertions, 0 deletions
diff --git a/t/20-aseag.t b/t/20-aseag.t
index cd3f043..2d96037 100644
--- a/t/20-aseag.t
+++ b/t/20-aseag.t
@@ -16,6 +16,14 @@ require_ok('Travel::Status::DE::ASEAG');
my $rawstr = slurp('t/in/aseag_20131223T132300');
my $s = Travel::Status::DE::ASEAG->new_from_raw(
+ datetime => DateTime->new(
+ year => 2014,
+ month => 1,
+ day => 3,
+ hour => 20,
+ minute => 1,
+ time_zone => 'Europe/Berlin'
+ ),
raw_str => $rawstr,
hide_past => 0
);
@@ -60,6 +68,14 @@ is( ( first { $_->stop ne 'Aachen Bushof' } @results ),
# exact matching: also works in constructor
$s = Travel::Status::DE::ASEAG->new_from_raw(
+ datetime => DateTime->new(
+ year => 2014,
+ month => 1,
+ day => 3,
+ hour => 20,
+ minute => 1,
+ time_zone => 'Europe/Berlin'
+ ),
raw_str => $rawstr,
hide_past => 0,
stop => 'Aachen Bushof',
diff --git a/t/22-results-via.t b/t/22-results-via.t
index 1aa335d..7bda954 100644
--- a/t/22-results-via.t
+++ b/t/22-results-via.t
@@ -20,6 +20,14 @@ my ($s, @results);
# via filter in ->results, implicit route_after
$s = Travel::Status::DE::ASEAG->new_from_raw(
+ datetime => DateTime->new(
+ year => 2013,
+ month => 12,
+ day => 23,
+ hour => 10,
+ minute => 0,
+ time_zone => 'Europe/Berlin'
+ ),
raw_str => $rawstr,
hide_past => 0,
stop => 'Aachen Bushof',