Bugzilla – Attachment 81251 Details for
Bug 21337
Add Koha::Patrons->delete
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21337: (QA follow-up) Rename exception code
Bug-21337-QA-follow-up-Rename-exception-code.patch (text/plain), 2.10 KB, created by
Marcel de Rooy
on 2018-10-26 07:58:55 UTC
(
hide
)
Description:
Bug 21337: (QA follow-up) Rename exception code
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-10-26 07:58:55 UTC
Size:
2.10 KB
patch
obsolete
>From 626c918b57a823f1122e569def516ab9729dd786 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 25 Oct 2018 14:25:10 +0200 >Subject: [PATCH] Bug 21337: (QA follow-up) Rename exception code >Content-Type: text/plain; charset=utf-8 > >Patron::Delete becomes Patron::FailedDelete. >Trivial replace. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Exceptions/Patron.pm | 2 +- > Koha/Patrons.pm | 2 +- > t/db_dependent/Koha/Patrons.t | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Exceptions/Patron.pm b/Koha/Exceptions/Patron.pm >index 754f004..8eac9c9 100644 >--- a/Koha/Exceptions/Patron.pm >+++ b/Koha/Exceptions/Patron.pm >@@ -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" > }, > ); >diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm >index 21061cd..dedf4c4 100644 >--- a/Koha/Patrons.pm >+++ b/Koha/Patrons.pm >@@ -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 ); >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index e2e8019..c552220 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -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'; > }; > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21337
:
78586
|
78619
|
78621
|
79461
|
79462
|
79708
|
79709
|
79915
|
79916
|
79917
|
80624
| 81251 |
81252
|
81257