Bugzilla – Attachment 154278 Details for
Bug 34435
get_password_expiry_date should not modify its parameter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34435: Add unit test
Bug-34435-Add-unit-test.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2023-08-04 13:39:45 UTC
(
hide
)
Description:
Bug 34435: Add unit test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-08-04 13:39:45 UTC
Size:
1.52 KB
patch
obsolete
>From 6255f3e08e541d3e8867567e56609977816222e0 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Thu, 27 Jul 2023 12:29:15 -0400 >Subject: [PATCH] Bug 34435: Add unit test > >To test: >prove t/db_dependent/Koha/Patron/Category.t > >Signed-off-by: Sam Lau <samalau@gmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/Patron/Category.t | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Patron/Category.t b/t/db_dependent/Koha/Patron/Category.t >index eeed7843485..0300cb4721c 100755 >--- a/t/db_dependent/Koha/Patron/Category.t >+++ b/t/db_dependent/Koha/Patron/Category.t >@@ -206,7 +206,7 @@ subtest 'effective_require_strong_password' => sub { > > subtest 'get_password_expiry_date() tests' => sub { > >- plan tests => 2; >+ plan tests => 3; > > $schema->storage->txn_begin; > >@@ -218,6 +218,14 @@ subtest 'get_password_expiry_date() tests' => sub { > $category->password_expiry_days( 32 )->store; > is( $category->get_password_expiry_date(), dt_from_string()->add( days => 32 )->ymd, "Date correctly calculated from password_expiry_days when set"); > >+ my $dt = dt_from_string; >+ my $original_dt = $dt->clone; >+ $category->get_password_expiry_date($dt); >+ is( >+ $dt->ymd, $original_dt->ymd, >+ 'DateTime object passed as a parameter should not be modified when ->get_password_expiry_date is called' >+ ); >+ > }; > > subtest 'can_make_suggestions' => sub { >-- >2.25.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 34435
:
153998
|
153999
|
154100
|
154101
| 154278 |
154279