Lines 25-31
use Koha::CirculationRules;
Link Here
|
25 |
|
25 |
|
26 |
use Koha::Patrons; |
26 |
use Koha::Patrons; |
27 |
|
27 |
|
28 |
use Test::More tests => 16; |
28 |
use Test::More tests => 17; |
29 |
use t::lib::Mocks; |
29 |
use t::lib::Mocks; |
30 |
use t::lib::TestBuilder; |
30 |
use t::lib::TestBuilder; |
31 |
|
31 |
|
Lines 291-299
$query =
Link Here
|
291 |
"INSERT INTO issues (borrowernumber,itemnumber,branchcode) VALUES( ?,?,? )"; |
291 |
"INSERT INTO issues (borrowernumber,itemnumber,branchcode) VALUES( ?,?,? )"; |
292 |
$dbh->do( $query, {}, $borrower_id1, $item_id1, $samplebranch1->{branchcode} ); |
292 |
$dbh->do( $query, {}, $borrower_id1, $item_id1, $samplebranch1->{branchcode} ); |
293 |
|
293 |
|
|
|
294 |
t::lib::Mocks::mock_preference( 'CataloguingLog', 1 ); |
295 |
my $log_count_before = $schema->resultset('ActionLog')->search({module => 'CATALOGUING'})->count(); |
294 |
my ($doreturn, $messages, $iteminformation, $borrower) = AddReturn('barcode_1', |
296 |
my ($doreturn, $messages, $iteminformation, $borrower) = AddReturn('barcode_1', |
295 |
$samplebranch2->{branchcode}); |
297 |
$samplebranch2->{branchcode}); |
296 |
is( $messages->{NeedsTransfer}, $samplebranch1->{branchcode}, "AddReturn respects default return policy - return to homebranch" ); |
298 |
is( $messages->{NeedsTransfer}, $samplebranch1->{branchcode}, "AddReturn respects default return policy - return to homebranch" ); |
|
|
299 |
my $log_count_after = $schema->resultset('ActionLog')->search({module => 'CATALOGUING'})->count(); |
300 |
is($log_count_before, $log_count_after, "Update to holdingbranch is not logged"); |
297 |
|
301 |
|
298 |
# item2 returned at branch2 should trigger transfer to holding branch |
302 |
# item2 returned at branch2 should trigger transfer to holding branch |
299 |
$query = |
303 |
$query = |
300 |
- |
|
|