From 64e6c20f9f77b0b7a908da40e1f09aa82b7d25b5 Mon Sep 17 00:00:00 2001 From: Christophe Maudoux Date: Sat, 9 Feb 2019 23:05:51 +0100 Subject: [PATCH] Improve unit test (#1595) --- lemonldap-ng-portal/t/02-Password-Demo.t | 25 +++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/lemonldap-ng-portal/t/02-Password-Demo.t b/lemonldap-ng-portal/t/02-Password-Demo.t index 0bc582d8f..cb4e4ef87 100644 --- a/lemonldap-ng-portal/t/02-Password-Demo.t +++ b/lemonldap-ng-portal/t/02-Password-Demo.t @@ -15,6 +15,8 @@ my $client = LLNG::Manager::Test->new( { passwordDB => 'Demo', portalRequireOldPassword => 1, showLanguages => 0, + translations => 'site/templates/localeTranslations.txt', + error_de_85 => 'From lemonlap-ng.ini', } } ); @@ -23,7 +25,28 @@ ok( $res = $client->_get( '/', accept => 'text/html' ), 'Get Menu' ); ok( $res->[2]->[0] !~ m%%, ' No language icon found' ) or print STDERR Dumper( $res->[2]->[0] ); -count(2); +ok( $res->[2]->[0] =~ m%"trOver"%, + ' trOver found' ) + or print STDERR Dumper( $res->[2]->[0] ); +ok( $res->[2]->[0] =~ m%"all":\{\}%, + ' all found' ) + or print STDERR Dumper( $res->[2]->[0] ); +ok( $res->[2]->[0] =~ m%"en":\{"PE5":"Big brother is watching you, authenticated user"\}%, + ' en found' ) + or print STDERR Dumper( $res->[2]->[0] ); +ok( $res->[2]->[0] =~ m%"PE0":"Souriez, vous êtes surveillés !"%, + ' PE0 found' ) + or print STDERR Dumper( $res->[2]->[0] ); +ok( $res->[2]->[0] =~ m%"selectIdP":"Portail de Fédération des Identités"%, + ' selectIdP found' ) + or print STDERR Dumper( $res->[2]->[0] ); +ok( $res->[2]->[0] =~ m%"fr":\{%, + ' fr found' ) + or print STDERR Dumper( $res->[2]->[0] ); +ok( $res->[2]->[0] =~ m%"PE85":"From lemonlap-ng.ini"%, + ' PE85 found' ) + or print STDERR Dumper( $res->[2]->[0] ); +count(9); # Try yo authenticate # ------------------- -- GitLab