Bugzilla – Attachment 152342 Details for
Bug 33997
Borrowers.updated_on should not be updated by track_login
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33997: (QA follow-up) Add unit test
Bug-33997-QA-follow-up-Add-unit-test.patch (text/plain), 1.63 KB, created by
Matt Blenkinsop
on 2023-06-14 15:16:06 UTC
(
hide
)
Description:
Bug 33997: (QA follow-up) Add unit test
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-06-14 15:16:06 UTC
Size:
1.63 KB
patch
obsolete
>From ecf8d51ea01321f02938f2543c01f272680f8ef7 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 14 Jun 2023 15:14:53 +0000 >Subject: [PATCH] Bug 33997: (QA follow-up) Add unit test > >This patch adds a unit test > >prove -v t/db_dependent/Members.t >--- > t/db_dependent/Members.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t >index 7d9852af57..55ca460603 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 53; >+use Test::More tests => 55; > use Test::MockModule; > use Test::Exception; > >@@ -336,13 +336,16 @@ my $patron2 = $builder->build({ > value => { > lastseen => undef, > flags => undef, >+ updated_on => '2023-01-01 00:00:00' > } > }); > t::lib::Mocks::mock_preference( 'TrackLastPatronActivity', '0' ); > Koha::Patrons->find( $patron2->{borrowernumber} )->track_login; > is( Koha::Patrons->find( $patron2->{borrowernumber} )->lastseen, undef, 'Lastseen should not be changed' ); >+is( Koha::Patrons->find( $patron2->{borrowernumber} )->updated_on, '2023-01-01 00:00:00', 'Updated_on should not be changed' ); > Koha::Patrons->find( $patron2->{borrowernumber} )->track_login({ force => 1 }); > isnt( Koha::Patrons->find( $patron2->{borrowernumber} )->lastseen, undef, 'Lastseen should be changed now' ); >+is( Koha::Patrons->find( $patron2->{borrowernumber} )->updated_on, '2023-01-01 00:00:00', 'Updated_on should not be changed' ); > > # Test GetBorrowersToExpunge and regular patron with permission > $builder->build({ >-- >2.37.1 (Apple Git-137.1)
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 33997
:
152294
|
152321
| 152342