Bug 21337: (QA follow-up) Rename exception code
Patron::Delete becomes Patron::FailedDelete. Trivial replace. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
91d168200e
commit
8ae6242d08
|
|
@ -6,7 +6,7 @@ use Exception::Class (
|
|||
'Koha::Exceptions::Patron' => {
|
||||
description => "Something went wrong!"
|
||||
},
|
||||
'Koha::Exceptions::Patron::Delete' => {
|
||||
'Koha::Exceptions::Patron::FailedDelete' => {
|
||||
description => "Deleting patron failed"
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ sub delete {
|
|||
my ( $set, $params ) = @_;
|
||||
while( my $patron = $set->next ) {
|
||||
$patron->move_to_deleted if $params->{move};
|
||||
$patron->delete == 1 || Koha::Exceptions::Patron::Delete->throw;
|
||||
$patron->delete == 1 || Koha::Exceptions::Patron::FailedDelete->throw;
|
||||
$patrons_deleted++;
|
||||
}
|
||||
}, $self, $params );
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ subtest 'Koha::Patrons->delete' => sub {
|
|||
$patron1 = $builder->build_object({ class => 'Koha::Patrons' });
|
||||
$id1 = $patron1->borrowernumber;
|
||||
$set = Koha::Patrons->search({ borrowernumber => { '>=' => $id1 }});
|
||||
throws_ok { $set->delete } 'Koha::Exceptions::Patron::Delete',
|
||||
throws_ok { $set->delete } 'Koha::Exceptions::Patron::FailedDelete',
|
||||
'Exception raised for deleting patron';
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue