|
Lines 19-25
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 12; |
22 |
use Test::More tests => 13; |
| 23 |
|
23 |
|
| 24 |
use C4::Biblio; |
24 |
use C4::Biblio; |
| 25 |
use C4::Context; |
25 |
use C4::Context; |
|
Lines 365-367
subtest 'outgoing_transfers' => sub {
Link Here
|
| 365 |
|
365 |
|
| 366 |
$schema->storage->txn_rollback; |
366 |
$schema->storage->txn_rollback; |
| 367 |
}; |
367 |
}; |
| 368 |
- |
368 |
|
|
|
369 |
subtest 'single_library_mode aka singleBranchMode' => sub { |
| 370 |
plan tests => 3; |
| 371 |
$schema->storage->txn_begin; |
| 372 |
|
| 373 |
Koha::Libraries->new->update({ public => 0 }); |
| 374 |
is( Koha::Libraries->single_library_mode, 0, 'No public libraries' ); |
| 375 |
my $library1 = $builder->build_object({ class => 'Koha::Libraries', value => { public => 1 } }); |
| 376 |
is( Koha::Libraries->single_library_mode, 1, 'One public library' ); |
| 377 |
my $library2 = $builder->build_object({ class => 'Koha::Libraries', value => { public => 1 } }); |
| 378 |
is( Koha::Libraries->single_library_mode, 0, 'Two public libraries' ); |
| 379 |
|
| 380 |
$schema->storage->txn_rollback; |
| 381 |
}; |