Adjust t/12-journey-edit.t (journeys->add: backend_id is mandatory)
This commit is contained in:
parent
ba79f62f67
commit
78d4494364
1 changed files with 8 additions and 3 deletions
|
@ -16,6 +16,7 @@ use FindBin;
|
||||||
require "$FindBin::Bin/../index.pl";
|
require "$FindBin::Bin/../index.pl";
|
||||||
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
use utf8;
|
||||||
|
|
||||||
my $t = Test::Mojo->new('Travelynx');
|
my $t = Test::Mojo->new('Travelynx');
|
||||||
|
|
||||||
|
@ -75,11 +76,12 @@ $t->post_ok(
|
||||||
);
|
);
|
||||||
$t->status_is(302)->header_is( location => '/' );
|
$t->status_is(302)->header_is( location => '/' );
|
||||||
|
|
||||||
$t->app->journeys->add(
|
my ( $success, $error ) = $t->app->journeys->add(
|
||||||
db => $t->app->pg->db,
|
db => $t->app->pg->db,
|
||||||
uid => $uid,
|
uid => $uid,
|
||||||
dep_station => 'EMSTP',
|
backend_id => 1,
|
||||||
arr_station => 'EG',
|
dep_station => 'Münster(Westf)Hbf',
|
||||||
|
arr_station => 'Gelsenkirchen Hbf',
|
||||||
sched_departure => DateTime->new(
|
sched_departure => DateTime->new(
|
||||||
year => 2018,
|
year => 2018,
|
||||||
month => 10,
|
month => 10,
|
||||||
|
@ -119,6 +121,9 @@ $t->app->journeys->add(
|
||||||
comment => 'Huhu'
|
comment => 'Huhu'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ok( $success, "journeys->add" );
|
||||||
|
is( $error, undef, "journeys->add" );
|
||||||
|
|
||||||
$t->get_ok('/journey/1')->status_is(200)->content_like(qr{M.nster\(Westf\)Hbf})
|
$t->get_ok('/journey/1')->status_is(200)->content_like(qr{M.nster\(Westf\)Hbf})
|
||||||
->content_like(qr{Gelsenkirchen Hbf})->content_like(qr{RE 11238})
|
->content_like(qr{Gelsenkirchen Hbf})->content_like(qr{RE 11238})
|
||||||
->content_like(qr{Linie 42})->content_like(qr{..:36})
|
->content_like(qr{Linie 42})->content_like(qr{..:36})
|
||||||
|
|
Loading…
Reference in a new issue