Lines 1293-1299
subtest 'anonymise items_last_borrower' => sub {
Link Here
|
1293 |
t::lib::Mocks::mock_preference('StoreLastBorrower', 1); |
1293 |
t::lib::Mocks::mock_preference('StoreLastBorrower', 1); |
1294 |
|
1294 |
|
1295 |
subtest 'withrawn, lost and damaged items' => sub { |
1295 |
subtest 'withrawn, lost and damaged items' => sub { |
1296 |
plan tests => 5; |
1296 |
plan tests => 6; |
1297 |
|
1297 |
|
1298 |
my $patron = $builder->build_object( |
1298 |
my $patron = $builder->build_object( |
1299 |
{ |
1299 |
{ |
Lines 1351-1357
subtest 'anonymise items_last_borrower' => sub {
Link Here
|
1351 |
$item_2->itemlost(1)->store; |
1351 |
$item_2->itemlost(1)->store; |
1352 |
$item_3->damaged(1)->store; |
1352 |
$item_3->damaged(1)->store; |
1353 |
|
1353 |
|
1354 |
Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history(); |
1354 |
my $nb_rows = Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history(); |
|
|
1355 |
is( $nb_rows, 4, 'anonymise_issue_history should have returned the number of checkouts anonymised'); |
1355 |
|
1356 |
|
1356 |
my $dbh = C4::Context->dbh; |
1357 |
my $dbh = C4::Context->dbh; |
1357 |
my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|); |
1358 |
my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|); |
1358 |
- |
|
|