Improve unit test (#2605)

This commit is contained in:
Christophe Maudoux 2021-09-23 22:45:28 +02:00
parent 7accf35268
commit 9176237f05
1 changed files with 10 additions and 3 deletions

View File

@ -9,8 +9,12 @@ BEGIN {
my ( $client, $res, $id );
$client = LLNG::Manager::Test->new( {
ini =>
{ logLevel => 'error', restSessionServer => 1, useSafeJail => 1 },
ini => {
logLevel => 'error',
restSessionServer => 1,
useSafeJail => 1,
sameSite => 'Strict'
},
}
);
@ -52,7 +56,10 @@ ok(
count(1);
expectOK($res);
$id = expectCookie($res);
my $rawCookie = getHeader( $res, 'Set-Cookie' );
ok( $rawCookie =~ /;\s*SameSite=Strict/, 'Found SameSite=Strict (conf)' )
or explain( $rawCookie, 'SameSite value must be "Strict"' );
count(1);
ok( $res = $client->_get("/sessions/global/$id"), 'Get session' );
count(1);
expectOK($res);