Lines 1037-1047
subtest 'search_patrons_to_anonymise & anonymise_issue_history' => sub {
Link Here
|
1037 |
t::lib::Mocks::mock_preference( 'AnonymousPatron', $anonymous->{borrowernumber} ); |
1037 |
t::lib::Mocks::mock_preference( 'AnonymousPatron', $anonymous->{borrowernumber} ); |
1038 |
|
1038 |
|
1039 |
subtest 'Anonymous Patron should be undeleteable' => sub { |
1039 |
subtest 'Anonymous Patron should be undeleteable' => sub { |
1040 |
plan tests => 1; |
1040 |
plan tests => 2; |
1041 |
|
1041 |
|
1042 |
my $anonymous_patron = Koha::Patrons->find( $anonymous->{borrowernumber} ); |
1042 |
my $anonymous_patron = Koha::Patrons->find( $anonymous->{borrowernumber} ); |
1043 |
$anonymous_patron->delete(); |
1043 |
warn "X" x 100; |
|
|
1044 |
throws_ok { $anonymous_patron->delete(); } |
1045 |
'Koha::Exceptions::Patron::FailedDeleteAnonymousPatron', |
1046 |
'Attempt to delete anonymous patron throws exception.'; |
1047 |
warn "Y" x 100; |
1044 |
$anonymous_patron = Koha::Patrons->find( $anonymous->{borrowernumber} ); |
1048 |
$anonymous_patron = Koha::Patrons->find( $anonymous->{borrowernumber} ); |
|
|
1049 |
warn "X" x 100; |
1045 |
is( $anonymous_patron->id, $anonymous->{borrowernumber}, "Anonymous Patron was not deleted" ); |
1050 |
is( $anonymous_patron->id, $anonymous->{borrowernumber}, "Anonymous Patron was not deleted" ); |
1046 |
}; |
1051 |
}; |
1047 |
|
1052 |
|
1048 |
- |
|
|