Fix tests

This commit is contained in:
Christophe Maudoux 2018-12-30 19:54:07 +01:00
parent 0731bd5fb5
commit 8c36bab6bf
4 changed files with 4 additions and 4 deletions

View File

@ -207,8 +207,8 @@ t/99-pod.t
t/conf/lmConf-1.json
t/jsonfiles/01-base-tree.json
t/jsonfiles/02-base-tree-all-nodes-opened.json
t/jsonfiles/11-modified-with-confirmation.json
t/jsonfiles/12-modified.json
t/jsonfiles/13-modified-with-confirmation.json
t/jsonfiles/14-bad.json
t/jsonfiles/15-combination.json
t/lemonldap-ng.ini

View File

@ -610,7 +610,7 @@ sub tests {
checkMailResetSecurity => sub {
return 1 unless ( $conf->{portalDisplayResetPassword} );
return ( -1,
'"passwordMailReset" plugin is enabled without CSRF Token or Captcha required !!!'
'"passwordMailReset" plugin is enabled without CSRF Token neither Captcha required !!!'
)
unless ( $conf->{requireToken}
or $conf->{captcha_mail_enabled} );

View File

@ -6,7 +6,7 @@ use strict;
use JSON;
require 't/test-lib.pm';
my $struct = 't/jsonfiles/13-modified-with-confirmation.json';
my $struct = 't/jsonfiles/11-modified-with-confirmation.json';
my $confFiles = [ 't/conf/lmConf-1.json', 't/conf/lmConf-2.json' ];
sub body {
@ -47,7 +47,7 @@ ok( @{ $resBody->{details}->{__needConfirmation__} } == 1,
) or print STDERR Dumper($resBody);
ok( $resBody->{details}->{__needConfirmation__}->[0]->{message}
=~ /\bplugin is enabled without CSRF Token or Captcha required\b/,
=~ /\bplugin is enabled without CSRF Token neither Captcha required\b/,
"Warning with confirmation needed found"
) or print STDERR Dumper($resBody);