|
Lines 489-495
subtest 'pickup_locations' => sub {
Link Here
|
| 489 |
}; |
489 |
}; |
| 490 |
|
490 |
|
| 491 |
subtest 'request_transfer' => sub { |
491 |
subtest 'request_transfer' => sub { |
| 492 |
plan tests => 13; |
492 |
plan tests => 15; |
| 493 |
$schema->storage->txn_begin; |
493 |
$schema->storage->txn_begin; |
| 494 |
|
494 |
|
| 495 |
my $library1 = $builder->build_object( { class => 'Koha::Libraries' } ); |
495 |
my $library1 = $builder->build_object( { class => 'Koha::Libraries' } ); |
|
Lines 549-554
subtest 'request_transfer' => sub {
Link Here
|
| 549 |
is($transfers->count, 1, "There is only 1 live transfer in the queue"); |
549 |
is($transfers->count, 1, "There is only 1 live transfer in the queue"); |
| 550 |
$replaced_transfer->datearrived(dt_from_string)->store(); |
550 |
$replaced_transfer->datearrived(dt_from_string)->store(); |
| 551 |
|
551 |
|
|
|
552 |
$transfer = $item->request_transfer({ to => $library2, reason => 'Manual' }); |
| 553 |
ok(!$transfer->datesent, "Transfer not marked as sent by default"); |
| 554 |
$transfer->datearrived(dt_from_string)->store(); |
| 555 |
$transfer = $item->request_transfer({ to => $library2, reason => 'Manual', send_transfer => 1 }); |
| 556 |
ok($transfer->datesent, "Transfer marked as sent if send_transfer is passed"); |
| 557 |
$transfer->datearrived(dt_from_string)->store(); |
| 558 |
|
| 552 |
# BranchTransferLimits |
559 |
# BranchTransferLimits |
| 553 |
t::lib::Mocks::mock_preference('UseBranchTransferLimits', 1); |
560 |
t::lib::Mocks::mock_preference('UseBranchTransferLimits', 1); |
| 554 |
t::lib::Mocks::mock_preference('BranchTransferLimitsType', 'itemtype'); |
561 |
t::lib::Mocks::mock_preference('BranchTransferLimitsType', 'itemtype'); |
| 555 |
- |
|
|