Lines 1037-1046
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 |
throws_ok { $anonymous_patron->delete(); } |
|
|
1044 |
'Koha::Exceptions::Patron::FailedDeleteAnonymousPatron', |
1045 |
'Attempt to delete anonymous patron throws exception.'; |
1044 |
$anonymous_patron = Koha::Patrons->find( $anonymous->{borrowernumber} ); |
1046 |
$anonymous_patron = Koha::Patrons->find( $anonymous->{borrowernumber} ); |
1045 |
is( $anonymous_patron->id, $anonymous->{borrowernumber}, "Anonymous Patron was not deleted" ); |
1047 |
is( $anonymous_patron->id, $anonymous->{borrowernumber}, "Anonymous Patron was not deleted" ); |
1046 |
}; |
1048 |
}; |
1047 |
- |
|
|