Lines 1220-1226
subtest 'anonymise items_last_borrower' => sub {
Link Here
|
1220 |
t::lib::Mocks::mock_preference('StoreLastBorrower', 1); |
1220 |
t::lib::Mocks::mock_preference('StoreLastBorrower', 1); |
1221 |
|
1221 |
|
1222 |
subtest 'withrawn, lost and damaged items' => sub { |
1222 |
subtest 'withrawn, lost and damaged items' => sub { |
1223 |
plan tests => 5; |
1223 |
plan tests => 6; |
1224 |
|
1224 |
|
1225 |
my $patron = $builder->build_object( |
1225 |
my $patron = $builder->build_object( |
1226 |
{ |
1226 |
{ |
Lines 1278-1284
subtest 'anonymise items_last_borrower' => sub {
Link Here
|
1278 |
$item_2->itemlost(1)->store; |
1278 |
$item_2->itemlost(1)->store; |
1279 |
$item_3->damaged(1)->store; |
1279 |
$item_3->damaged(1)->store; |
1280 |
|
1280 |
|
1281 |
Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history(); |
1281 |
my $nb_rows = Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history(); |
|
|
1282 |
is( $nb_rows, 4, 'anonymise_issue_history should have returned the number of checkouts anonymised'); |
1282 |
|
1283 |
|
1283 |
my $dbh = C4::Context->dbh; |
1284 |
my $dbh = C4::Context->dbh; |
1284 |
my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|); |
1285 |
my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|); |
1285 |
- |
|
|