Lines 1344-1350
subtest 'StaffLoginBranchBasedOnIP' => sub {
Link Here
|
1344 |
|
1344 |
|
1345 |
subtest 'AutoLocation' => sub { |
1345 |
subtest 'AutoLocation' => sub { |
1346 |
|
1346 |
|
1347 |
plan tests => 7; |
1347 |
plan tests => 8; |
1348 |
|
1348 |
|
1349 |
$schema->storage->txn_begin; |
1349 |
$schema->storage->txn_begin; |
1350 |
|
1350 |
|
Lines 1396-1401
subtest 'AutoLocation' => sub {
Link Here
|
1396 |
my $session = C4::Auth::get_session($sessionID); |
1396 |
my $session = C4::Auth::get_session($sessionID); |
1397 |
is( $session->param('branch'), $patron->branchcode ); |
1397 |
is( $session->param('branch'), $patron->branchcode ); |
1398 |
|
1398 |
|
|
|
1399 |
my $noip_library = $builder->build_object( { class => 'Koha::Libraries', value => { branchip => '' } } ); |
1400 |
$cgi->param( 'branch', $noip_library->branchcode ); |
1401 |
( $userid, $cookie, $sessionID, $flags, $template ) = |
1402 |
C4::Auth::checkauth( $cgi, 0, { catalogue => 1 }, 'intranet' ); |
1403 |
$session = C4::Auth::get_session($sessionID); |
1404 |
is( $session->param('branch'), $noip_library->branchcode ); |
1405 |
|
1399 |
$schema->storage->txn_rollback; |
1406 |
$schema->storage->txn_rollback; |
1400 |
|
1407 |
|
1401 |
}; |
1408 |
}; |
1402 |
- |
|
|