|
Lines 287-293
subtest 'replace_library_limits() tests' => sub {
Link Here
|
| 287 |
$schema->storage->txn_rollback; |
287 |
$schema->storage->txn_rollback; |
| 288 |
}; |
288 |
}; |
| 289 |
|
289 |
|
| 290 |
subtest 'search() with branch limits tests' => sub { |
290 |
subtest 'search_with_library_limits() tests' => sub { |
| 291 |
|
291 |
|
| 292 |
plan tests => 3; |
292 |
plan tests => 3; |
| 293 |
|
293 |
|
|
Lines 322-337
subtest 'search() with branch limits tests' => sub {
Link Here
|
| 322 |
$object_code_2->library_limits( [$branch_2] ); |
322 |
$object_code_2->library_limits( [$branch_2] ); |
| 323 |
$object_code_3->library_limits( [ $branch_1, $branch_2 ] ); |
323 |
$object_code_3->library_limits( [ $branch_1, $branch_2 ] ); |
| 324 |
|
324 |
|
| 325 |
is( Koha::Patron::Attribute::Types->search( { branchcode => $branch_1 } ) |
325 |
is( Koha::Patron::Attribute::Types->search_with_library_limits( {}, {}, $branch_1 )->count, |
| 326 |
->count, |
326 |
3, '3 attribute types are available for the specified branch' ); |
| 327 |
3, |
327 |
is( Koha::Patron::Attribute::Types->search_with_library_limits( {}, {}, $branch_2 )->count, |
| 328 |
'3 attribute types are available for the specified branch' |
328 |
3, '3 attribute types are available for the specified branch' ); |
| 329 |
); |
|
|
| 330 |
is( Koha::Patron::Attribute::Types->search( { branchcode => $branch_2 } ) |
| 331 |
->count, |
| 332 |
3, |
| 333 |
'3 attribute types are available for the specified branch' |
| 334 |
); |
| 335 |
|
329 |
|
| 336 |
$schema->storage->txn_rollback; |
330 |
$schema->storage->txn_rollback; |
| 337 |
}; |
331 |
}; |
| 338 |
- |
|
|