This commit is contained in:
Xavier 2019-06-15 22:28:24 +02:00
parent eabe1dc129
commit c7dd179f2c
1 changed files with 14 additions and 2 deletions

View File

@ -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() );