Unverified Commit 0d4a1786 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Tests: Hard-code German locale

parent d11d0d5c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ require "$FindBin::Bin/../index.pl";

my $t = Test::Mojo->new('Travelynx');

$t->ua->on( start => sub { $_[1]->req->headers->accept_language('de-DE') } );

$t->get_ok('/')->status_is(200);
$t->text_like( 'a[href="/register"]' => qr{Registrieren} );
$t->text_like( 'a[href="/login"]'    => qr{Anmelden} );
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ require "$FindBin::Bin/../index.pl";

my $t = Test::Mojo->new('Travelynx');

$t->ua->on( start => sub { $_[1]->req->headers->accept_language('de-DE') } );

if ( not $t->app->config->{db} ) {
	plan( skip_all => 'No database configured' );
}
@@ -206,7 +208,8 @@ $res = $t->app->pg->db->select( 'pending_passwords', ['token'],
	{ user_id => $uid } );
$token = $res->hash->{token};

$t->get_ok("/recover/${uid}/${token}")->status_is(200)
$t->get_ok("/recover/${uid}/${token}")
  ->status_is(200)
  ->content_like(qr{Neues Passwort eintragen});

$t->post_ok(
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ require "$FindBin::Bin/../index.pl";

my $t = Test::Mojo->new('Travelynx');

$t->ua->on( start => sub { $_[1]->req->headers->accept_language('de-DE') } );

if ( not $t->app->config->{db} ) {
	plan( skip_all => 'No database configured' );
}
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ use utf8;

my $t = Test::Mojo->new('Travelynx');

$t->ua->on( start => sub { $_[1]->req->headers->accept_language('de-DE') } );

if ( not $t->app->config->{db} ) {
	plan( skip_all => 'No database configured' );
}
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ require "$FindBin::Bin/../index.pl";

my $t = Test::Mojo->new('Travelynx');

$t->ua->on( start => sub { $_[1]->req->headers->accept_language('de-DE') } );

if ( not $t->app->config->{db} ) {
	plan( skip_all => 'No database configured' );
}
Loading