Bug 38505: CanBookBeIssued preparation: Add tests for falsy barcode
prove t/db_dependent/Circulation.t
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 45626c75c4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
a52ab11e82
commit
5cc10bb9bf
|
|
@ -2258,7 +2258,7 @@ subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
|
|||
}
|
||||
|
||||
subtest 'CanBookBeIssued & AllowReturnToBranch' => sub {
|
||||
plan tests => 24;
|
||||
plan tests => 26;
|
||||
|
||||
my $homebranch = $builder->build( { source => 'Branch' } );
|
||||
my $holdingbranch = $builder->build( { source => 'Branch' } );
|
||||
|
|
@ -2305,6 +2305,10 @@ subtest 'CanBookBeIssued & AllowReturnToBranch' => sub {
|
|||
set_userenv($homebranch);
|
||||
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, 'KohaIsAwesome' );
|
||||
ok( $error->{UNKNOWN_BARCODE}, '"KohaIsAwesome" is not a valid barcode as expected.' );
|
||||
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, undef );
|
||||
ok( $error->{UNKNOWN_BARCODE}, 'undef is not a valid barcode as expected.' );
|
||||
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, '' );
|
||||
ok( $error->{UNKNOWN_BARCODE}, '"" is not a valid barcode as expected.' );
|
||||
## Can be issued from homebranch
|
||||
set_userenv($homebranch);
|
||||
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, $item->barcode );
|
||||
|
|
|
|||
Loading…
Reference in New Issue