View | Details | Raw Unified | Return to bug 24295
Collapse All | Expand All

(-)a/t/db_dependent/Circulation/transferbook.t (-8 / +7 lines)
Lines 21-27 use Test::More tests => 6; Link Here
21
use t::lib::TestBuilder;
21
use t::lib::TestBuilder;
22
use t::lib::Mocks;
22
use t::lib::Mocks;
23
23
24
use C4::Circulation qw( transferbook AddIssue GetTransfers );
24
use C4::Circulation qw( transferbook AddIssue );
25
use C4::Reserves qw( AddReserve );
25
use C4::Reserves qw( AddReserve );
26
use Koha::DateUtils qw( dt_from_string );
26
use Koha::DateUtils qw( dt_from_string );
27
use Koha::Item::Transfers;
27
use Koha::Item::Transfers;
Lines 287-303 subtest 'transferbook test from branch' => sub { Link Here
287
        barcode   => $item->barcode,
287
        barcode   => $item->barcode,
288
        trigger => "Manual"
288
        trigger => "Manual"
289
    });
289
    });
290
    my ($datesent,$from_branch,$to_branch) = GetTransfers($item->itemnumber);
290
    my $transfer = $item->get_transfer;
291
    is( $from_branch, $library->branchcode, 'The transfer is initiated from the specified branch, not the items home or holdingbranch');
291
    is( $transfer->frombranch, $library->branchcode, 'The transfer is initiated from the specified branch, not the items home or holdingbranch');
292
    is( $to_branch, $item->homebranch, 'The transfer is initiated to the specified branch');
292
    is( $transfer->tobranch, $item->homebranch, 'The transfer is initiated to the specified branch');
293
    C4::Circulation::transferbook({
293
    C4::Circulation::transferbook({
294
        from_branch => $item->homebranch,
294
        from_branch => $item->homebranch,
295
        to_branch => $library->branchcode,
295
        to_branch => $library->branchcode,
296
        barcode   => $item->barcode,
296
        barcode   => $item->barcode,
297
        trigger => "Manual"
297
        trigger => "Manual"
298
    });
298
    });
299
    ($datesent,$from_branch,$to_branch) = GetTransfers($item->itemnumber);
299
    $transfer = $item->get_transfer;
300
    is( $from_branch, $item->homebranch, 'The transfer is initiated from the specified branch');
300
    is( $transfer->frombranch, $item->homebranch, 'The transfer is initiated from the specified branch');
301
    is( $to_branch, $library->branchcode, 'The transfer is initiated to the specified branch');
301
    is( $transfer->tobranch, $library->branchcode, 'The transfer is initiated to the specified branch');
302
302
303
};
303
};
304
- 

Return to bug 24295