From aef1ebc34893d7f0742089434a4a41e0bb37e2c3 Mon Sep 17 00:00:00 2001 From: Maxime Besson Date: Tue, 19 Apr 2022 17:09:15 +0200 Subject: [PATCH] Fix unit tests for new Captcha API (#2692) New API does not differentiate between empty and wrong captcha --- lemonldap-ng-portal/t/41-Captcha.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lemonldap-ng-portal/t/41-Captcha.t b/lemonldap-ng-portal/t/41-Captcha.t index e16962490..2f8ed72fb 100644 --- a/lemonldap-ng-portal/t/41-Captcha.t +++ b/lemonldap-ng-portal/t/41-Captcha.t @@ -2,7 +2,7 @@ use Test::More; use strict; use IO::String; use JSON; -use Lemonldap::NG::Portal::Main::Constants 'PE_CAPTCHAEMPTY'; +use Lemonldap::NG::Portal::Main::Constants 'PE_CAPTCHAERROR'; require 't/test-lib.pm'; @@ -42,8 +42,8 @@ SKIP: { my $json; ok( $json = eval { from_json( $res->[2]->[0] ) }, 'Response is JSON' ) or print STDERR "$@\n" . Dumper($res); - ok( $json->{error} == PE_CAPTCHAEMPTY, 'Response is PE_CAPTCHAEMPTY' ) - or explain( $json, "error => 77" ); + ok( $json->{error} == PE_CAPTCHAERROR, 'Response is PE_CAPTCHAERROR' ) + or explain( $json, "error => 76" ); # Test normal first access # ------------------------