Bugzilla – Attachment 91474 Details for
Bug 23219
Show a warning about cancelling their holds before a patron is deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23219: (QA Follow up) Cancel patrons holds when patron delete
Bug-23219-QA-Follow-up-Cancel-patrons-holds-when-p.patch (text/plain), 1.80 KB, created by
Katrin Fischer
on 2019-07-12 06:17:37 UTC
(
hide
)
Description:
Bug 23219: (QA Follow up) Cancel patrons holds when patron delete
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-07-12 06:17:37 UTC
Size:
1.80 KB
patch
obsolete
>From 16e3e7a3597f4878e643fdb8b6ec33b52e3c7f91 Mon Sep 17 00:00:00 2001 >From: Emmi <emmi.takkinen@outlook.com> >Date: Tue, 9 Jul 2019 09:24:30 +0300 >Subject: [PATCH] Bug 23219: (QA Follow up) Cancel patrons holds when patron > delete > >Adds test for patrons holds cancelation when patron is deleted. > >Test plan: >Run t/db_dependent/Koha/Patrons.t > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Koha/Patrons.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 9d5de6bfe3..b98037a9ce 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -32,6 +32,7 @@ use C4::Biblio; > use C4::Auth qw(checkpw_hash); > > use Koha::Holds; >+use Koha::Old::Holds; > use Koha::Patrons; > use Koha::Patron::Categories; > use Koha::Database; >@@ -369,7 +370,7 @@ subtest "move_to_deleted" => sub { > }; > > subtest "delete" => sub { >- plan tests => 5; >+ plan tests => 6; > t::lib::Mocks::mock_preference( 'BorrowersLog', 1 ); > my $patron = $builder->build( { source => 'Borrower' } ); > my $retrieved_patron = Koha::Patrons->find( $patron->{borrowernumber} ); >@@ -389,6 +390,8 @@ subtest "delete" => sub { > > is( Koha::Patrons->find( $patron->{borrowernumber} ), undef, 'Koha::Patron->delete should have deleted the patron' ); > >+ is (Koha::Old::Holds->search( { reserve_id => $hold->{ reserve_id } } )->count, 1, q|Koha::Patron->delete should have cancelled patron's holds| ); >+ > is( Koha::Holds->search( { borrowernumber => $patron->{borrowernumber} } )->count, 0, q|Koha::Patron->delete should have deleted patron's holds| ); > > is( Koha::Virtualshelves->search( { owner => $patron->{borrowernumber} } )->count, 0, q|Koha::Patron->delete should have deleted patron's lists| ); >-- >2.11.0
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 23219
:
91175
|
91281
|
91331
|
91333
|
91351
|
91395
|
91423
|
91473
| 91474 |
91475