Bug 35918: Add test

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e00cfb3c7b3954e545ad4b363bff48a8f4345d0a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2024-01-26 08:57:03 +01:00 committed by Fridolin Somers
parent 6e4711d925
commit 7073d11457

View file

@ -1270,7 +1270,7 @@ subtest 'checkpw() return values tests' => sub {
subtest 'AutoLocation' => sub {
plan tests => 6;
plan tests => 7;
$schema->storage->txn_begin;
@ -1315,6 +1315,13 @@ subtest 'AutoLocation' => sub {
is( $userid, $patron->userid );
is( $template, undef );
my $other_library = $builder->build_object( { class => 'Koha::Libraries', value => { branchip => '127.0.0.1' } } );
$patron->library->branchip('127.0.0.1')->store;
( $userid, $cookie, $sessionID, $flags, $template ) =
C4::Auth::checkauth( $cgi, 0, { catalogue => 1 }, 'intranet' );
my $session = C4::Auth::get_session($sessionID);
is( $session->param('branch'), $patron->branchcode );
$schema->storage->txn_rollback;
};