Commit 8c36bab6 authored by Christophe Maudoux's avatar Christophe Maudoux

Fix tests

parent 0731bd5f
Pipeline #3833 passed with stages
in 11 minutes and 18 seconds
...@@ -207,8 +207,8 @@ t/99-pod.t ...@@ -207,8 +207,8 @@ t/99-pod.t
t/conf/lmConf-1.json t/conf/lmConf-1.json
t/jsonfiles/01-base-tree.json t/jsonfiles/01-base-tree.json
t/jsonfiles/02-base-tree-all-nodes-opened.json t/jsonfiles/02-base-tree-all-nodes-opened.json
t/jsonfiles/11-modified-with-confirmation.json
t/jsonfiles/12-modified.json t/jsonfiles/12-modified.json
t/jsonfiles/13-modified-with-confirmation.json
t/jsonfiles/14-bad.json t/jsonfiles/14-bad.json
t/jsonfiles/15-combination.json t/jsonfiles/15-combination.json
t/lemonldap-ng.ini t/lemonldap-ng.ini
......
...@@ -610,7 +610,7 @@ sub tests { ...@@ -610,7 +610,7 @@ sub tests {
checkMailResetSecurity => sub { checkMailResetSecurity => sub {
return 1 unless ( $conf->{portalDisplayResetPassword} ); return 1 unless ( $conf->{portalDisplayResetPassword} );
return ( -1, 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} unless ( $conf->{requireToken}
or $conf->{captcha_mail_enabled} ); or $conf->{captcha_mail_enabled} );
......
...@@ -6,7 +6,7 @@ use strict; ...@@ -6,7 +6,7 @@ use strict;
use JSON; use JSON;
require 't/test-lib.pm'; 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' ]; my $confFiles = [ 't/conf/lmConf-1.json', 't/conf/lmConf-2.json' ];
sub body { sub body {
...@@ -47,7 +47,7 @@ ok( @{ $resBody->{details}->{__needConfirmation__} } == 1, ...@@ -47,7 +47,7 @@ ok( @{ $resBody->{details}->{__needConfirmation__} } == 1,
) or print STDERR Dumper($resBody); ) or print STDERR Dumper($resBody);
ok( $resBody->{details}->{__needConfirmation__}->[0]->{message} 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" "Warning with confirmation needed found"
) or print STDERR Dumper($resBody); ) or print STDERR Dumper($resBody);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment