Bugzilla – Attachment 97073 Details for
Bug 24379
Patron login attempts happen to be NULL instead of 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24379: Fix the test
Bug-24379-Fix-the-test.patch (text/plain), 1.25 KB, created by
Jonathan Druart
on 2020-01-09 12:57:39 UTC
(
hide
)
Description:
Bug 24379: Fix the test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-01-09 12:57:39 UTC
Size:
1.25 KB
patch
obsolete
>From 4edc53078b3cbf36c3ba6c63e3c21451a936bb25 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 9 Jan 2020 13:55:58 +0100 >Subject: [PATCH] Bug 24379: Fix the test > >First we create a patron using TestBuilder to get a hashref of valid >info. Then we delete it and create a new patron using Koha::Patron->new >Once stored, we should call discard_changes to make the calculated >values available in the currenct object. >--- > t/db_dependent/Koha/Patron.t | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t >index a8fee982a9..7d5c8574e7 100644 >--- a/t/db_dependent/Koha/Patron.t >+++ b/t/db_dependent/Koha/Patron.t >@@ -166,9 +166,10 @@ subtest 'login_attempts tests' => sub { > } > ); > my $patron_info = $patron->unblessed; >+ $patron->delete; > delete $patron_info->{login_attempts}; >- my $new_patron = Koha::Patron->new($patron_info); >- is( $new_patron->login_attempts, 0, "login_attempts defaults to 0 as expected"); >+ my $new_patron = Koha::Patron->new($patron_info)->store; >+ is( $new_patron->discard_changes->login_attempts, 0, "login_attempts defaults to 0 as expected"); > > $schema->storage->txn_rollback; > }; >-- >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 24379
:
97058
|
97073
|
105522
|
106846
|
106847
|
106890
|
107099