Bugzilla – Attachment 164040 Details for
Bug 36159
Patron imports record a change for non-text columns that are not in the import file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36159: Add unit test
Bug-36159-Add-unit-test.patch (text/plain), 1.61 KB, created by
Kyle M Hall (khall)
on 2024-03-28 10:37:35 UTC
(
hide
)
Description:
Bug 36159: Add unit test
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-03-28 10:37:35 UTC
Size:
1.61 KB
patch
obsolete
>From 5a4c5ebbfb352e759b370d599d7956bd28755a00 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 28 Mar 2024 06:36:25 -0400 >Subject: [PATCH] Bug 36159: Add unit test > >--- > t/db_dependent/Koha/Patrons.t | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 85a1159fcda..ca186941b7a 100755 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -1608,7 +1608,7 @@ $retrieved_patron_1->delete; > is( Koha::Patrons->search->count, $nb_of_patrons - 1, 'Delete should have deleted the patron' ); > > subtest 'BorrowersLog tests' => sub { >- plan tests => 4; >+ plan tests => 5; > > t::lib::Mocks::mock_preference( 'BorrowersLog', 1 ); > my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); >@@ -1627,6 +1627,13 @@ subtest 'BorrowersLog tests' => sub { > $patron->update_lastseen('connection'); > @logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber } ); > is( scalar @logs, 1, 'With BorrowerLogs and TrackLastPatronActivityTriggers we should not spam the logs'); >+ >+ Koha::ActionLogs->search()->delete(); >+ $patron->get_from_storage(); >+ $patron->set( { debarred => "" }); >+ $patron->store; >+ my $log = Koha::ActionLogs->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber } )->next; >+ isnt( defined $log, "No action log generated where incoming changed column is empty string and value in storage is NULL" ); > }; > $schema->storage->txn_rollback; > >-- >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 36159
:
162392
|
162669
|
162672
|
162689
|
164038
|
164039
|
164040
|
164113
|
164114
|
164115
|
164124