diff --git a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t index e8a20ce31..725dad84d 100644 --- a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t +++ b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t @@ -37,8 +37,9 @@ LWP::Protocol::PSGI->register( ' Post request' ); count(1); - expectOK($res); - $idpId = expectCookie($res); + ok( ( $res->[0] == 200 or $res->[0] == 401 ), ' Get 200 or 401' ); + count(1); + $idpId = expectCookie($res) if ( $res->[0] == 200 ); } elsif ( $req->method =~ /^(get|delete)$/i ) { my $mth = '_' . lc($1); @@ -222,6 +223,17 @@ ok( count(1); expectReject($res); +# Try to auth with a bad password +ok( + $res = $sp->_post( + '/', IO::String->new('user=dwho&password=xxxx'), + length => 23, + accept => 'text/html' + ), + 'Post user/password' +); +count(1); + clean_sessions(); done_testing( count() );