Fix warning messages
This commit is contained in:
parent
849609aec3
commit
4f44b69290
|
@ -119,7 +119,7 @@ ok(
|
|||
ok( $res->[0] == 200, 'Code is 200' ) or explain( $res->[0], 200 );
|
||||
count(2);
|
||||
|
||||
my %headers = @{ $res->[1] };
|
||||
%headers = @{ $res->[1] };
|
||||
ok( $headers{'zero'} eq '0', 'Found "zero" header with "0"' )
|
||||
or print STDERR Data::Dumper::Dumper( $res->[1] );
|
||||
ok( $headers{'empty'} eq '', 'Found "empty" header without value' )
|
||||
|
|
|
@ -21,7 +21,7 @@ count(1);
|
|||
|
||||
$notif =
|
||||
'{"date":"2099-13-30","uid":"dwho","reference":"Test","xml":"{\"title\":\"Test\"}"}';
|
||||
my $res =
|
||||
$res =
|
||||
&client->jsonPostResponse( 'notifications/actives', '',
|
||||
IO::String->new($notif),
|
||||
'application/json', length($notif) );
|
||||
|
@ -30,7 +30,7 @@ count(1);
|
|||
|
||||
$notif =
|
||||
'{"date":"2099-05_12","uid":"dwho","reference":"Test","xml":"{\"title\":\"Test\"}"}';
|
||||
my $res =
|
||||
$res =
|
||||
&client->jsonPostResponse( 'notifications/actives', '',
|
||||
IO::String->new($notif),
|
||||
'application/json', length($notif) );
|
||||
|
|
|
@ -87,7 +87,6 @@ ok(
|
|||
'Password min lower not respected'
|
||||
);
|
||||
expectBadRequest($res);
|
||||
my $json;
|
||||
ok( $json = eval { from_json( $res->[2]->[0] ) }, 'Response is JSON' )
|
||||
or print STDERR "$@\n" . Dumper($res);
|
||||
ok(
|
||||
|
@ -124,7 +123,6 @@ ok(
|
|||
'Password min upper not respected'
|
||||
);
|
||||
expectBadRequest($res);
|
||||
my $json;
|
||||
ok( $json = eval { from_json( $res->[2]->[0] ) }, 'Response is JSON' )
|
||||
or print STDERR "$@\n" . Dumper($res);
|
||||
ok(
|
||||
|
@ -161,7 +159,6 @@ ok(
|
|||
'Password min digit not respected'
|
||||
);
|
||||
expectBadRequest($res);
|
||||
my $json;
|
||||
ok( $json = eval { from_json( $res->[2]->[0] ) }, 'Response is JSON' )
|
||||
or print STDERR "$@\n" . Dumper($res);
|
||||
ok(
|
||||
|
|
|
@ -82,7 +82,7 @@ $res = $op->_post(
|
|||
);
|
||||
my $idpId = expectCookie($res);
|
||||
|
||||
my $query =
|
||||
$query =
|
||||
"response_type=code&scope=openid%20profile%20email%20offline_access&"
|
||||
. "client_id=rpid&state=af0ifjsldkj&redirect_uri=http%3A%2F%2Ftest%2F";
|
||||
$res = $op->_get(
|
||||
|
|
|
@ -103,7 +103,7 @@ count(1);
|
|||
my $idpId = expectCookie($res);
|
||||
|
||||
# Get code for RP1
|
||||
my $query =
|
||||
$query =
|
||||
"response_type=code&scope=openid%20profile%20email&client_id=rpid&state=af0ifjsldkj&redirect_uri=http%3A%2F%2Frp2.com%2F";
|
||||
ok(
|
||||
$res = $op->_get(
|
||||
|
@ -141,7 +141,7 @@ is( $res->[0], 400, "Got invalid request" );
|
|||
count(1);
|
||||
|
||||
# Get new code for RP1
|
||||
my $query =
|
||||
$query =
|
||||
"response_type=code&scope=openid%20profile%20email&client_id=rpid&state=af0ifjsldkj&redirect_uri=http%3A%2F%2Frp.com%2F";
|
||||
ok(
|
||||
$res = $op->_get(
|
||||
|
@ -154,7 +154,7 @@ ok(
|
|||
);
|
||||
count(1);
|
||||
|
||||
my ($code) = expectRedirection( $res, qr#http://rp\.com/.*code=([^\&]*)# );
|
||||
($code) = expectRedirection( $res, qr#http://rp\.com/.*code=([^\&]*)# );
|
||||
|
||||
# Play code on RP1
|
||||
$query =
|
||||
|
|
|
@ -248,7 +248,6 @@ m%<span notif=\'testref\' epoch=\'(\d{10})\' class="btn btn-success" role="butto
|
|||
),
|
||||
'Bad query'
|
||||
);
|
||||
my $json;
|
||||
ok( $json = eval { from_json( $res->[2]->[0] ) }, 'Response is JSON' )
|
||||
or print STDERR "$@\n" . Dumper($res);
|
||||
ok( !$json->{result}, ' Result is 0' )
|
||||
|
|
|
@ -142,7 +142,7 @@ m#<img class="renewcaptchaclick" src="/static/common/icons/arrow_refresh.png" al
|
|||
# Try to renew captcha
|
||||
ok( $res = $client->_get( '/renewcaptcha', accept => 'text/html' ),
|
||||
'Unauth request to renew Captcha' );
|
||||
my $json = eval { JSON::from_json( $res->[2]->[0] ) };
|
||||
$json = eval { JSON::from_json( $res->[2]->[0] ) };
|
||||
ok( ( defined $json->{newtoken} and $json->{newtoken} =~ /^\d{10}_\d+$/ ),
|
||||
'New token has been received' )
|
||||
or explain( $json->{newtoken}, 'NO token received' );
|
||||
|
|
|
@ -259,7 +259,7 @@ lkRrWfQftwmLyNIu3HfSgXlgAZS30ymfbzBU
|
|||
# Create the certificate file
|
||||
$cert = "INVALID CERTIFICATE";
|
||||
|
||||
open my $FH2, '>', '/tmp/v296ZJQ_kG';
|
||||
open $FH2, '>', '/tmp/v296ZJQ_kG';
|
||||
print {$FH2} "$cert";
|
||||
close $FH2;
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ lkRrWfQftwmLyNIu3HfSgXlgAZS30ymfbzBU
|
|||
# Create the certificate file
|
||||
$cert = "INVALID CERTIFICATE";
|
||||
|
||||
open my $FH2, '>', '/tmp/v296ZJQ_kG';
|
||||
open $FH2, '>', '/tmp/v296ZJQ_kG';
|
||||
print {$FH2} "$cert";
|
||||
close $FH2;
|
||||
|
||||
|
|
|
@ -231,7 +231,6 @@ JjTJecOOS+88fK8qL1TrYv5rapIdqUI7aQ==
|
|||
version => "U2F_V2"
|
||||
}
|
||||
);
|
||||
( $host, $url, $query );
|
||||
$query = Lemonldap::NG::Common::FormEncode::build_urlencoded(
|
||||
registration => $registrationData,
|
||||
challenge => $res->[2]->[0],
|
||||
|
|
Loading…
Reference in New Issue