Lines 113-118
subtest 'testing _add_default_csrf_params with/without userenv (bug 27849)' => s
Link Here
|
113 |
is( $result->{id}, 'anonymous_567', 'Check userid' ); |
113 |
is( $result->{id}, 'anonymous_567', 'Check userid' ); |
114 |
|
114 |
|
115 |
# Clear userenv |
115 |
# Clear userenv |
|
|
116 |
C4::Context->unset_userenv(); |
116 |
is( C4::Context::userenv, undef, 'No userenv anymore' ); |
117 |
is( C4::Context::userenv, undef, 'No userenv anymore' ); |
117 |
$result = Koha::Token::_add_default_csrf_params({}); # pass no session_id |
118 |
$result = Koha::Token::_add_default_csrf_params({}); # pass no session_id |
118 |
is( $result->{session_id}, Koha::Token::DEFA_SESSION_ID, 'Check session id' ); |
119 |
is( $result->{session_id}, Koha::Token::DEFA_SESSION_ID, 'Check session id' ); |
119 |
- |
|
|