diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-08-10 11:42:42 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-08-10 11:42:42 +0200 |
commit | 78d4494364a577ac2c17ffef36a8020b66d76654 (patch) | |
tree | 257ef83f60db2f7bd2990da08caac7a449d7bb2d | |
parent | ba79f62f67d294cb4ad42e86e18673238eee4a34 (diff) |
Adjust t/12-journey-edit.t (journeys->add: backend_id is mandatory)
-rw-r--r-- | t/12-journey-edit.t | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/t/12-journey-edit.t b/t/12-journey-edit.t index fed58e5..f8b8ee5 100644 --- a/t/12-journey-edit.t +++ b/t/12-journey-edit.t @@ -16,6 +16,7 @@ use FindBin; require "$FindBin::Bin/../index.pl"; use DateTime; +use utf8; my $t = Test::Mojo->new('Travelynx'); @@ -75,11 +76,12 @@ $t->post_ok( ); $t->status_is(302)->header_is( location => '/' ); -$t->app->journeys->add( +my ( $success, $error ) = $t->app->journeys->add( db => $t->app->pg->db, uid => $uid, - dep_station => 'EMSTP', - arr_station => 'EG', + backend_id => 1, + dep_station => 'Münster(Westf)Hbf', + arr_station => 'Gelsenkirchen Hbf', sched_departure => DateTime->new( year => 2018, month => 10, @@ -119,6 +121,9 @@ $t->app->journeys->add( 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}) ->content_like(qr{Gelsenkirchen Hbf})->content_like(qr{RE 11238}) ->content_like(qr{Linie 42})->content_like(qr{..:36}) |