diff --git a/lemonldap-ng-portal/MANIFEST b/lemonldap-ng-portal/MANIFEST index ea0a05c22..4f104ac52 100644 --- a/lemonldap-ng-portal/MANIFEST +++ b/lemonldap-ng-portal/MANIFEST @@ -367,6 +367,7 @@ site/htdocs/static/languages/vi.json site/htdocs/static/languages/zh.json site/templates/bootstrap/2fchoice.tpl site/templates/bootstrap/2fregisters.tpl +site/templates/bootstrap/captcha.tpl site/templates/bootstrap/casBack2Url.tpl site/templates/bootstrap/checklogins.tpl site/templates/bootstrap/checkuser.tpl diff --git a/lemonldap-ng-portal/t/41-Captcha.t b/lemonldap-ng-portal/t/41-Captcha.t index d5ed9abf6..701e6ab9e 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 = 18; +my $maintests = 24; SKIP: { eval 'use GD::SecurityImage;use Image::Magick;'; if ($@) { @@ -47,7 +47,6 @@ m%[2]->[0], '[2]->[0] =~ m#{captcha}&token=$json->{newtoken}"; + ok( + $res = $client->_post( + '/', + IO::String->new($query), + length => length($query) + ), + 'Try to auth with new captcha value' + ); + expectOK($res); + $id = expectCookie($res); + ok( + $res = $client->_get( + '/', + query => 'url=aHR0cDovL3Rlc3QxLmV4YW1wbGUuY29tLw==', + cookie => "lemonldap=$id", + accept => 'text/html' + ), + 'Auth request with redirection' + ); + expectRedirection( $res, 'http://test1.example.com/' ); + expectAuthenticatedAs( $res, 'dwho' ); } count($maintests);