summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-07-20 10:52:53 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2025-07-20 10:52:53 +0200
commit0d4a178666011eb2f10d9fe1f28ea92b589681b8 (patch)
tree26d0f79685ba4b3214c6b4322a89c7a3dea26ead /t
parentd11d0d5cb53896ea46de5b9186b481d678b5ad93 (diff)
Tests: Hard-code German locale
Diffstat (limited to 't')
-rw-r--r--t/01-static.t2
-rw-r--r--t/02-registration.t5
-rw-r--r--t/11-journey-stats.t2
-rw-r--r--t/12-journey-edit.t2
-rw-r--r--t/21-relations.t2
-rw-r--r--t/22-transit-visibility.t2
-rw-r--r--t/23-journey-visibility.t2
-rw-r--r--t/24-past-visibility.t2
-rw-r--r--t/r-negative-delay.t2
9 files changed, 20 insertions, 1 deletions
diff --git a/t/01-static.t b/t/01-static.t
index 3727f1e..4247225 100644
--- a/t/01-static.t
+++ b/t/01-static.t
@@ -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} );
diff --git a/t/02-registration.t b/t/02-registration.t
index 799022f..ec09eaf 100644
--- a/t/02-registration.t
+++ b/t/02-registration.t
@@ -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(
diff --git a/t/11-journey-stats.t b/t/11-journey-stats.t
index 3fc8724..d5af010 100644
--- a/t/11-journey-stats.t
+++ b/t/11-journey-stats.t
@@ -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' );
}
diff --git a/t/12-journey-edit.t b/t/12-journey-edit.t
index 5854d62..f0b2f36 100644
--- a/t/12-journey-edit.t
+++ b/t/12-journey-edit.t
@@ -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' );
}
diff --git a/t/21-relations.t b/t/21-relations.t
index 857d20d..c5fbe32 100644
--- a/t/21-relations.t
+++ b/t/21-relations.t
@@ -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' );
}
diff --git a/t/22-transit-visibility.t b/t/22-transit-visibility.t
index 8a68f5c..3e15163 100644
--- a/t/22-transit-visibility.t
+++ b/t/22-transit-visibility.t
@@ -20,6 +20,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' );
}
diff --git a/t/23-journey-visibility.t b/t/23-journey-visibility.t
index 1cc7e64..6de6941 100644
--- a/t/23-journey-visibility.t
+++ b/t/23-journey-visibility.t
@@ -20,6 +20,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' );
}
diff --git a/t/24-past-visibility.t b/t/24-past-visibility.t
index cf981b9..06ec13e 100644
--- a/t/24-past-visibility.t
+++ b/t/24-past-visibility.t
@@ -20,6 +20,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' );
}
diff --git a/t/r-negative-delay.t b/t/r-negative-delay.t
index b5283e5..45ebade 100644
--- a/t/r-negative-delay.t
+++ b/t/r-negative-delay.t
@@ -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' );
}