Bug 36367: Fix test t/Token.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Julian Maurice 2024-04-18 16:26:44 +02:00 committed by Martin Renvoize
parent d5a6d987c9
commit ebbcf6ac8f
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -113,6 +113,7 @@ subtest 'testing _add_default_csrf_params with/without userenv (bug 27849)' => s
is( $result->{id}, 'anonymous_567', 'Check userid' ); is( $result->{id}, 'anonymous_567', 'Check userid' );
# Clear userenv # Clear userenv
C4::Context->unset_userenv();
is( C4::Context::userenv, undef, 'No userenv anymore' ); is( C4::Context::userenv, undef, 'No userenv anymore' );
$result = Koha::Token::_add_default_csrf_params({}); # pass no session_id $result = Koha::Token::_add_default_csrf_params({}); # pass no session_id
is( $result->{session_id}, Koha::Token::DEFA_SESSION_ID, 'Check session id' ); is( $result->{session_id}, Koha::Token::DEFA_SESSION_ID, 'Check session id' );