Bug 35918: Add test

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-01-26 08:57:03 +01:00
parent 200799c11e
commit 837d04527a
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0

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;
};