Lines 2258-2264
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
2258 |
} |
2258 |
} |
2259 |
|
2259 |
|
2260 |
subtest 'CanBookBeIssued & AllowReturnToBranch' => sub { |
2260 |
subtest 'CanBookBeIssued & AllowReturnToBranch' => sub { |
2261 |
plan tests => 24; |
2261 |
plan tests => 26; |
2262 |
|
2262 |
|
2263 |
my $homebranch = $builder->build( { source => 'Branch' } ); |
2263 |
my $homebranch = $builder->build( { source => 'Branch' } ); |
2264 |
my $holdingbranch = $builder->build( { source => 'Branch' } ); |
2264 |
my $holdingbranch = $builder->build( { source => 'Branch' } ); |
Lines 2305-2310
subtest 'CanBookBeIssued & AllowReturnToBranch' => sub {
Link Here
|
2305 |
set_userenv($homebranch); |
2305 |
set_userenv($homebranch); |
2306 |
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, 'KohaIsAwesome' ); |
2306 |
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, 'KohaIsAwesome' ); |
2307 |
ok( $error->{UNKNOWN_BARCODE}, '"KohaIsAwesome" is not a valid barcode as expected.' ); |
2307 |
ok( $error->{UNKNOWN_BARCODE}, '"KohaIsAwesome" is not a valid barcode as expected.' ); |
|
|
2308 |
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, undef ); |
2309 |
ok( $error->{UNKNOWN_BARCODE}, 'undef is not a valid barcode as expected.' ); |
2310 |
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, '' ); |
2311 |
ok( $error->{UNKNOWN_BARCODE}, '"" is not a valid barcode as expected.' ); |
2308 |
## Can be issued from homebranch |
2312 |
## Can be issued from homebranch |
2309 |
set_userenv($homebranch); |
2313 |
set_userenv($homebranch); |
2310 |
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, $item->barcode ); |
2314 |
( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, $item->barcode ); |
2311 |
- |
|
|