Lines 272-280
subtest do_hold => sub {
Link Here
|
272 |
}; |
272 |
}; |
273 |
|
273 |
|
274 |
subtest do_checkin => sub { |
274 |
subtest do_checkin => sub { |
275 |
plan tests => 8; |
275 |
plan tests => 11; |
276 |
|
276 |
|
277 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
277 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
|
|
278 |
my $library2 = $builder->build_object( { class => 'Koha::Libraries' } ); |
278 |
my $patron = $builder->build_object( |
279 |
my $patron = $builder->build_object( |
279 |
{ |
280 |
{ |
280 |
class => 'Koha::Patrons', |
281 |
class => 'Koha::Patrons', |
Lines 320-325
subtest do_checkin => sub {
Link Here
|
320 |
is( $patron->checkouts->count, 1, 'Checkout should have been done successfully'); |
321 |
is( $patron->checkouts->count, 1, 'Checkout should have been done successfully'); |
321 |
$ci_transaction->do_checkin($library->branchcode, undef); |
322 |
$ci_transaction->do_checkin($library->branchcode, undef); |
322 |
is( $patron->checkouts->count, 0, 'Checkin should have been done successfully'); |
323 |
is( $patron->checkouts->count, 0, 'Checkin should have been done successfully'); |
|
|
324 |
|
325 |
my $result = $ci_transaction->do_checkin($library2->branchcode, undef); |
326 |
is($ci_transaction->alert_type,'04',"Checkin of item no issued at another branch succeeds"); |
327 |
is_deeply($result,{ messages => { 'NotIssued' => $item->barcode, 'WasTransfered' => 1 } },"Messages show not issued and transferred"); |
328 |
is( $ci_transaction->item->destination_loc,$library->branchcode,"Item destination correctly set"); |
329 |
|
323 |
}; |
330 |
}; |
324 |
|
331 |
|
325 |
subtest checkin_lost => sub { |
332 |
subtest checkin_lost => sub { |
326 |
- |
|
|