Bugzilla – Attachment 77448 Details for
Bug 20660
AddReturn should use return date override for debarments
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20660: Test AddReturn with $return_date override
Bug-20660-Test-AddReturn-with-returndate-override.patch (text/plain), 2.34 KB, created by
Katrin Fischer
on 2018-08-02 14:59:43 UTC
(
hide
)
Description:
Bug 20660: Test AddReturn with $return_date override
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-08-02 14:59:43 UTC
Size:
2.34 KB
patch
obsolete
>From 5fd6b03eb502cfec245840f25efa2370720a5ac2 Mon Sep 17 00:00:00 2001 >From: David Bourgault <dav.bour@gmail.com> >Date: Tue, 1 May 2018 14:01:50 -0400 >Subject: [PATCH] Bug 20660: Test AddReturn with $return_date override > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Circulation.t | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 7cb5529..570b385 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1741,7 +1741,7 @@ subtest 'AddReturn + CumulativeRestrictionPeriods' => sub { > }; > > subtest 'AddReturn + suspension_chargeperiod' => sub { >- plan tests => 12; >+ plan tests => 14; > > my $library = $builder->build( { source => 'Branch' } ); > my $patron = $builder->build( { source => 'Borrower', value => { categorycode => $patron_category->{categorycode} } } ); >@@ -1892,6 +1892,16 @@ subtest 'AddReturn + suspension_chargeperiod' => sub { > expiration_date => $expected_expiration_dt->clone->add( days => 1 ), > } > ); >+ >+ test_debarment_on_checkout( >+ { >+ item => $item_1, >+ library => $library, >+ patron => $patron, >+ return_date => dt_from_string->add(days => 5), >+ expiration_date => dt_from_string->add(days => 5 + (5 * 2 - 1) ), >+ } >+ ); > }; > > subtest 'AddReturn | is_overdue' => sub { >@@ -2393,6 +2403,7 @@ sub test_debarment_on_checkout { > my $library = $params->{library}; > my $patron = $params->{patron}; > my $due_date = $params->{due_date} || dt_from_string; >+ my $return_date = $params->{return_date} || dt_from_string; > my $expected_expiration_date = $params->{expiration_date}; > > $expected_expiration_date = output_pref( >@@ -2407,7 +2418,7 @@ sub test_debarment_on_checkout { > AddIssue( $patron, $item->{barcode}, $due_date ); > > AddReturn( $item->{barcode}, $library->{branchcode}, >- undef, undef, dt_from_string ); >+ undef, undef, $return_date ); > my $debarments = Koha::Patron::Debarments::GetDebarments( > { borrowernumber => $patron->{borrowernumber}, type => 'SUSPENSION' } ); > is( scalar(@$debarments), 1, 'Test at line ' . $line_number ); >-- >2.1.4
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 20660
:
74857
|
74955
|
74956
|
77426
|
77427
| 77448 |
77449