From fe43d792a93fc94061cd4b7305e5dffb7c890d8f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 26 Jan 2024 08:57:03 +0100 Subject: [PATCH] Bug 35918: Add test Signed-off-by: Magnus Enger --- t/db_dependent/Auth.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t index 673f61782c..85aad99bde 100755 --- a/t/db_dependent/Auth.t +++ b/t/db_dependent/Auth.t @@ -1026,7 +1026,7 @@ subtest 'get_cataloguing_page_permissions() tests' => sub { subtest 'AutoLocation' => sub { - plan tests => 6; + plan tests => 7; $schema->storage->txn_begin; @@ -1071,6 +1071,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; }; -- 2.34.1