From 8d952e1b3a40d59d95e827aee419b3bf79194cb9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 22 Jan 2014 11:53:01 +0100 Subject: use predefined datetime for tests --- t/20-aseag.t | 16 ++++++++++++++++ t/22-results-via.t | 8 ++++++++ 2 files changed, 24 insertions(+) (limited to 't') 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', -- cgit v1.2.3