fix tests (use relative datetimes for proper past visibility handling)
This commit is contained in:
parent
8ec002f041
commit
a58a312baf
2 changed files with 8 additions and 8 deletions
|
@ -274,14 +274,14 @@ is(
|
||||||
undef
|
undef
|
||||||
);
|
);
|
||||||
|
|
||||||
my $dep = DateTime->now;
|
my $dep = DateTime->now->subtract( hours => 2 );
|
||||||
my $arr = $dep->clone->add( hours => 1 );
|
my $arr = DateTime->now->subtract( hours => 1 );
|
||||||
my $train_dep = Travel::Status::DE::IRIS::Result->new(
|
my $train_dep = Travel::Status::DE::IRIS::Result->new(
|
||||||
classes => 'N',
|
classes => 'N',
|
||||||
type => 'DPN',
|
type => 'DPN',
|
||||||
train_no => '667',
|
train_no => '667',
|
||||||
raw_id => '1234-2306251312-1',
|
raw_id => '1234-2306251312-1',
|
||||||
departure_ts => '2306251312',
|
departure_ts => $dep->strftime('%y%m%d%H%M'),
|
||||||
platform => 8,
|
platform => 8,
|
||||||
station => 'Aachen Hbf',
|
station => 'Aachen Hbf',
|
||||||
station_uic => 8000001,
|
station_uic => 8000001,
|
||||||
|
@ -292,7 +292,7 @@ my $train_arr = Travel::Status::DE::IRIS::Result->new(
|
||||||
type => 'DPN',
|
type => 'DPN',
|
||||||
train_no => '667',
|
train_no => '667',
|
||||||
raw_id => '1234-2306251312-3',
|
raw_id => '1234-2306251312-3',
|
||||||
arrival_ts => '2306252000',
|
arrival_ts => $arr->strftime('%y%m%d%H%M'),
|
||||||
platform => 1,
|
platform => 1,
|
||||||
station => 'Aalen Hbf',
|
station => 'Aalen Hbf',
|
||||||
station_uic => 8000002,
|
station_uic => 8000002,
|
||||||
|
|
|
@ -237,14 +237,14 @@ is(
|
||||||
undef
|
undef
|
||||||
);
|
);
|
||||||
|
|
||||||
my $dep = DateTime->now;
|
my $dep = DateTime->now->subtract( hours => 2 );
|
||||||
my $arr = $dep->clone->add( hours => 1 );
|
my $arr = DateTime->now->subtract( hours => 1 );
|
||||||
my $train_dep = Travel::Status::DE::IRIS::Result->new(
|
my $train_dep = Travel::Status::DE::IRIS::Result->new(
|
||||||
classes => 'N',
|
classes => 'N',
|
||||||
type => 'DPN',
|
type => 'DPN',
|
||||||
train_no => '667',
|
train_no => '667',
|
||||||
raw_id => '1234-2306251312-1',
|
raw_id => '1234-2306251312-1',
|
||||||
departure_ts => '2306251312',
|
departure_ts => $dep->strftime('%y%m%d%H%M'),
|
||||||
platform => 8,
|
platform => 8,
|
||||||
station => 'Aachen Hbf',
|
station => 'Aachen Hbf',
|
||||||
station_uic => 8000001,
|
station_uic => 8000001,
|
||||||
|
@ -255,7 +255,7 @@ my $train_arr = Travel::Status::DE::IRIS::Result->new(
|
||||||
type => 'DPN',
|
type => 'DPN',
|
||||||
train_no => '667',
|
train_no => '667',
|
||||||
raw_id => '1234-2306251312-3',
|
raw_id => '1234-2306251312-3',
|
||||||
arrival_ts => '2306252000',
|
arrival_ts => $arr->strftime('%y%m%d%H%M'),
|
||||||
platform => 1,
|
platform => 1,
|
||||||
station => 'Aalen Hbf',
|
station => 'Aalen Hbf',
|
||||||
station_uic => 8000002,
|
station_uic => 8000002,
|
||||||
|
|
Loading…
Reference in a new issue