|
Lines 20-26
Link Here
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
use utf8; |
21 |
use utf8; |
| 22 |
|
22 |
|
| 23 |
use Test::More tests => 15; |
23 |
use Test::More tests => 16; |
| 24 |
use Test::Exception; |
24 |
use Test::Exception; |
| 25 |
|
25 |
|
| 26 |
use C4::Biblio qw( GetMarcSubfieldStructure ); |
26 |
use C4::Biblio qw( GetMarcSubfieldStructure ); |
|
Lines 1420-1422
subtest 'Recalls tests' => sub {
Link Here
|
| 1420 |
$schema->storage->txn_rollback; |
1420 |
$schema->storage->txn_rollback; |
| 1421 |
}; |
1421 |
}; |
| 1422 |
|
1422 |
|
| 1423 |
- |
1423 |
subtest 'Notforloan tests' => sub { |
|
|
1424 |
|
| 1425 |
plan tests => 3; |
| 1426 |
|
| 1427 |
$schema->storage->txn_begin; |
| 1428 |
|
| 1429 |
my $item1 = $builder->build_sample_item; |
| 1430 |
$item1->update({ notforloan => 0 }); |
| 1431 |
$item1->itemtype->notforloan(0); |
| 1432 |
is ( $item1->is_notforloan, 0, 'Notforloan is correctly false by item status and item type'); |
| 1433 |
$item1->update({ notforloan => 1 }); |
| 1434 |
is ( $item1->is_notforloan, 1, 'Notforloan is correctly true by item status'); |
| 1435 |
$item1->update({ notforloan => 0 }); |
| 1436 |
$item1->itemtype->update({ notforloan => 1 }); |
| 1437 |
is ( $item1->is_notforloan, 1, 'Notforloan is correctly true by item type'); |
| 1438 |
|
| 1439 |
$schema->storage->txn_rollback; |
| 1440 |
}; |
| 1441 |
|