Bugzilla – Attachment 157153 Details for
Bug 35042
Members.t: should not set datelastseen to NULL everywhere
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35042: Remove set datelastseen to null on table in Members.t
Bug-35042-Remove-set-datelastseen-to-null-on-table.patch (text/plain), 2.76 KB, created by
Katrin Fischer
on 2023-10-14 15:33:22 UTC
(
hide
)
Description:
Bug 35042: Remove set datelastseen to null on table in Members.t
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-10-14 15:33:22 UTC
Size:
2.76 KB
patch
obsolete
>From 3315e7969bce30565fef24c54629afa0804108bf Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 12 Oct 2023 09:56:25 +0000 >Subject: [PATCH] Bug 35042: Remove set datelastseen to null on table in > Members.t > >Non-trivial was adding the category_type <> S. > >Test plan: >Run t/db_dependent/Members.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Members.t | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t >index 7dceafd1bb..1a314682c1 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -281,12 +281,17 @@ $patstodel = GetBorrowersToExpunge( {not_borrowed_since => '2016-01-02', patron_ > is( scalar(@$patstodel),2,'Borrowers without issues deleted by last issue date'); > > # Test GetBorrowersToExpunge and TrackLastPatronActivity >-$dbh->do(q|UPDATE borrowers SET lastseen=NULL|); >+my $new_category = $builder->build_object( >+ { >+ class => 'Koha::Patron::Categories', >+ value => { category_type => 'A' }, # should not be S for GetBorrowersToExpunge >+ } >+); > $builder->build({ > source => 'Borrower', > value => { > lastseen => '2016-01-01 01:01:01', >- categorycode => 'CIVILIAN', >+ categorycode => $new_category->categorycode, > flags => undef, > } > }); >@@ -294,7 +299,7 @@ $builder->build({ > source => 'Borrower', > value => { > lastseen => '2016-02-02 02:02:02', >- categorycode => 'CIVILIAN', >+ categorycode => $new_category->categorycode, > flags => undef, > } > }); >@@ -302,15 +307,15 @@ $builder->build({ > source => 'Borrower', > value => { > lastseen => '2016-03-03 03:03:03', >- categorycode => 'CIVILIAN', >+ categorycode => $new_category->categorycode, > flags => undef, > } > }); >-$patstodel = GetBorrowersToExpunge( { last_seen => '1999-12-12' }); >+$patstodel = GetBorrowersToExpunge( { category_code => $new_category->categorycode, last_seen => '1999-12-12' }); > is( scalar @$patstodel, 0, 'TrackLastPatronActivity - 0 patrons must be deleted' ); >-$patstodel = GetBorrowersToExpunge( { last_seen => '2016-02-15' }); >+$patstodel = GetBorrowersToExpunge( { category_code => $new_category->categorycode, last_seen => '2016-02-15' }); > is( scalar @$patstodel, 2, 'TrackLastPatronActivity - 2 patrons must be deleted' ); >-$patstodel = GetBorrowersToExpunge( { last_seen => '2016-04-04' }); >+$patstodel = GetBorrowersToExpunge( { category_code => $new_category->categorycode, last_seen => '2016-04-04' }); > is( scalar @$patstodel, 3, 'TrackLastPatronActivity - 3 patrons must be deleted' ); > my $patron2 = $builder->build({ > source => 'Borrower', >-- >2.30.2
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 35042
:
156954
| 157153