Lines 910-916
subtest 'search_patrons_to_anonymise & anonymise_issue_history' => sub {
Link Here
|
910 |
}; |
910 |
}; |
911 |
|
911 |
|
912 |
subtest 'patron privacy is 0 (forever)' => sub { |
912 |
subtest 'patron privacy is 0 (forever)' => sub { |
913 |
plan tests => 3; |
913 |
plan tests => 2; |
914 |
|
914 |
|
915 |
t::lib::Mocks::mock_preference('IndependentBranches', 0); |
915 |
t::lib::Mocks::mock_preference('IndependentBranches', 0); |
916 |
my $patron = $builder->build( |
916 |
my $patron = $builder->build( |
Lines 937-944
subtest 'search_patrons_to_anonymise & anonymise_issue_history' => sub {
Link Here
|
937 |
|
937 |
|
938 |
my ( $returned, undef, undef ) = C4::Circulation::AddReturn( $item->{barcode}, undef, undef, dt_from_string('2010-10-10') ); |
938 |
my ( $returned, undef, undef ) = C4::Circulation::AddReturn( $item->{barcode}, undef, undef, dt_from_string('2010-10-10') ); |
939 |
is( $returned, 1, 'The item should have been returned' ); |
939 |
is( $returned, 1, 'The item should have been returned' ); |
940 |
my $rows_affected = Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-11' } )->anonymise_issue_history( { before => '2010-10-11' } ); |
|
|
941 |
is( $rows_affected, 0, 'AnonymiseIssueHistory should not return any error if success' ); |
942 |
|
940 |
|
943 |
my $dbh = C4::Context->dbh; |
941 |
my $dbh = C4::Context->dbh; |
944 |
my ($borrowernumber_used_to_anonymised) = $dbh->selectrow_array(q| |
942 |
my ($borrowernumber_used_to_anonymised) = $dbh->selectrow_array(q| |
945 |
- |
|
|