diff --git a/lemonldap-ng-portal/t/28-AuthChoice-with-captcha.t b/lemonldap-ng-portal/t/28-AuthChoice-with-captcha.t
index ccb5e6caa6a039785716b9ee1538c50015d39b9b..d239c9fc498d19c2868216085cfbc83f4bfeeb31 100644
--- a/lemonldap-ng-portal/t/28-AuthChoice-with-captcha.t
+++ b/lemonldap-ng-portal/t/28-AuthChoice-with-captcha.t
@@ -5,7 +5,7 @@ use strict;
require 't/test-lib.pm';
my $res;
-my $maintests = 14;
+my $maintests = 16;
SKIP: {
eval 'use GD::SecurityImage;use Image::Magick;';
if ($@) {
@@ -39,6 +39,12 @@ SKIP: {
ok( $token = $1, ' Token value is defined' );
ok( $res->[2]->[0] =~ m#
#,
+ ' Renew Captcha button found'
+ ) or explain( $res->[2]->[0], 'Renew captcha button not found' );
+ ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
my @form = ( $res->[2]->[0] =~ m#
#sg );
ok( @form == 2, 'Display 2 choices' );
diff --git a/lemonldap-ng-portal/t/41-Captcha.t b/lemonldap-ng-portal/t/41-Captcha.t
index 0bdf754a9e40c13333b31e21a73d2a013167996c..eb41ecfcbc780e78b192263f68b0ff5ca92c7e41 100644
--- a/lemonldap-ng-portal/t/41-Captcha.t
+++ b/lemonldap-ng-portal/t/41-Captcha.t
@@ -6,7 +6,7 @@ require 't/test-lib.pm';
my $res;
-my $maintests = 25;
+my $maintests = 26;
SKIP: {
eval 'use GD::SecurityImage;use Image::Magick;';
if ($@) {
@@ -114,9 +114,10 @@ m%[2]->[0] =~
-m#
#,
+m#
#,
' Renew Captcha button found'
) or explain( $res->[2]->[0], 'Renew captcha button not found' );
+ ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
# Try to renew captcha
ok( $res = $client->_get( '/renewcaptcha', accept => 'text/html' ),
diff --git a/lemonldap-ng-portal/t/42-Register-Demo-with-captcha.t b/lemonldap-ng-portal/t/42-Register-Demo-with-captcha.t
index aa54f91c4b3a2f91e8abc88e01dfb561cb88bd72..8f965561f0ef017917da380b0e6839e29eec30fb 100644
--- a/lemonldap-ng-portal/t/42-Register-Demo-with-captcha.t
+++ b/lemonldap-ng-portal/t/42-Register-Demo-with-captcha.t
@@ -9,7 +9,7 @@ BEGIN {
};
}
-my $maintests = 26;
+my $maintests = 28;
my ( $res, $user, $pwd, $host, $url, $query );
my $mailSend = 0;
@@ -60,6 +60,12 @@ s/^.*token=([^&]+).*$/token=$1&firstname=who&lastname=doctor&mail=dwho%40badwolf
$res->[2]->[0] =~ m%
[2]->[0] );
+ ok(
+ $res->[2]->[0] =~
+m#
#,
+ ' Renew Captcha button found'
+ ) or explain( $res->[2]->[0], 'Renew captcha button not found' );
+ ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
$query .= "&captcha=$captcha";
diff --git a/lemonldap-ng-portal/t/43-MailPasswordReset-with-captcha.t b/lemonldap-ng-portal/t/43-MailPasswordReset-with-captcha.t
index d733c70ca9d8778ede826ae62116e562eb9b8526..1aae677ac736249a0005d30e1e07d8eebf8f4c92 100644
--- a/lemonldap-ng-portal/t/43-MailPasswordReset-with-captcha.t
+++ b/lemonldap-ng-portal/t/43-MailPasswordReset-with-captcha.t
@@ -10,7 +10,7 @@ BEGIN {
}
my ( $res, $host, $url, $query );
-my $maintests = 14;
+my $maintests = 16;
my $mailSend = 0;
my $mail2 = 0;
@@ -67,6 +67,12 @@ m%[2]->[0] );
+ ok(
+ $res->[2]->[0] =~
+m#
#,
+ ' Renew Captcha button found'
+ ) or explain( $res->[2]->[0], 'Renew captcha button not found' );
+ ok( $res->[2]->[0] =~ /captcha\.(?:min\.)?js/, 'Get captcha javascript' );
$query .= "&captcha=$captcha";