Lines 2251-2262
subtest 'Notforloan tests' => sub {
Link Here
|
2251 |
my $item1 = $builder->build_sample_item; |
2251 |
my $item1 = $builder->build_sample_item; |
2252 |
$item1->update({ notforloan => 0 }); |
2252 |
$item1->update({ notforloan => 0 }); |
2253 |
$item1->itemtype->notforloan(0); |
2253 |
$item1->itemtype->notforloan(0); |
2254 |
is ( $item1->is_notforloan, 0, 'Notforloan is correctly false by item status and item type'); |
2254 |
ok( !$item1->is_notforloan, 'Notforloan is correctly false by item status and item type'); |
2255 |
$item1->update({ notforloan => 1 }); |
2255 |
$item1->update({ notforloan => 1 }); |
2256 |
is ( $item1->is_notforloan, 1, 'Notforloan is correctly true by item status'); |
2256 |
ok( $item1->is_notforloan, 'Notforloan is correctly true by item status'); |
2257 |
$item1->update({ notforloan => 0 }); |
2257 |
$item1->update({ notforloan => 0 }); |
2258 |
$item1->itemtype->update({ notforloan => 1 }); |
2258 |
$item1->itemtype->update({ notforloan => 1 }); |
2259 |
is ( $item1->is_notforloan, 1, 'Notforloan is correctly true by item type'); |
2259 |
ok( $item1->is_notforloan, 'Notforloan is correctly true by item type'); |
2260 |
|
2260 |
|
2261 |
$schema->storage->txn_rollback; |
2261 |
$schema->storage->txn_rollback; |
2262 |
}; |
2262 |
}; |
2263 |
- |
|
|