Bug 20567: Add tests

Signed-off-by: Hans Palsson <hans.palsson@hkr.se>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-01-14 10:33:03 +01:00 committed by Martin Renvoize
parent 8b130c2eed
commit d29766433b
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -19,7 +19,7 @@
use Modern::Perl;
use Test::More tests => 38;
use Test::More tests => 39;
use t::lib::TestBuilder;
use t::lib::Mocks;
@ -289,5 +289,8 @@ ok( $hold_id, 'Second hold was placed' );
$can = CanBookBeReserved($patron->{borrowernumber}, $biblio->{biblionumber});
is( $can->{status}, 'tooManyHoldsForThisRecord', 'Third hold exceeds limit of holds per record' );
$schema->storage->txn_rollback;
Koha::Holds->find($hold_id)->found("W")->store;
$can = CanBookBeReserved($patron->{borrowernumber}, $biblio->{biblionumber});
is( $can->{status}, 'tooManyHoldsForThisRecord', 'Third hold exceeds limit of holds per record' );
$schema->storage->txn_rollback;