Akron | a65bd5d | 2024-10-24 13:28:11 +0200 | [diff] [blame^] | 1 | use Mojo::Base -strict; |
| 2 | use Test::More; |
| 3 | use Test::Mojo; |
| 4 | use Mojo::File qw/path/; |
| 5 | use utf8; |
| 6 | |
| 7 | $ENV{KALAMAR_VERSION} = '0.47.999'; |
| 8 | |
| 9 | my $t = Test::Mojo->new('Kalamar'); |
| 10 | |
| 11 | $t->app->mode('production'); |
| 12 | |
| 13 | $t->get_ok('/') |
| 14 | ->status_is(200) |
| 15 | ->text_is('title', 'KorAP - Corpus Analysis Platform') |
| 16 | ->text_is('h1 span', 'KorAP - Corpus Analysis Platform') |
| 17 | ; |
| 18 | |
| 19 | $t->get_ok('/' => { 'Accept-Language' => 'de-DE, en-US, en' }) |
| 20 | ->status_is(200) |
| 21 | ->text_is('title', 'KorAP - Korpusanalyseplattform der nächsten Generation') |
| 22 | ->text_is('h1 span', 'KorAP - Korpusanalyseplattform der nächsten Generation') |
| 23 | ; |
| 24 | |
| 25 | $t->get_ok('/' => { 'Accept-Language' => 'ro, en' }) |
| 26 | ->status_is(200) |
| 27 | ->text_is('title', 'KorAP - Platformă pentru analiza corpusului') |
| 28 | ->text_is('h1 span', 'KorAP - Platformă pentru analiza corpusului') |
| 29 | ; |
| 30 | |
| 31 | $t->get_ok('/' => { 'Accept-Language' => 'hu, en' }) |
| 32 | ->status_is(200) |
| 33 | ->text_is('title', 'KorAP - Korpuszelemző platform') |
| 34 | ->text_is('h1 span', 'KorAP - Korpuszelemző platform') |
| 35 | ; |
| 36 | |
| 37 | |
| 38 | done_testing(); |