Bugzilla – Attachment 61461 Details for
Bug 12063
Change date calculation for reserve expiration to skip all holidays
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12063 - Fix unit tests
Bug-12063---Fix-unit-tests.patch (text/plain), 2.12 KB, created by
Alex Arnaud
on 2017-03-22 15:17:43 UTC
(
hide
)
Description:
Bug 12063 - Fix unit tests
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2017-03-22 15:17:43 UTC
Size:
2.12 KB
patch
obsolete
>From 8e9b1dcaa8e3e3ac3740cd1ad458c5187b6be7f6 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Wed, 22 Mar 2017 12:55:49 +0000 >Subject: [PATCH] Bug 12063 - Fix unit tests > >--- > t/db_dependent/Holds/CancelReserves.t | 2 +- > t/db_dependent/Holds/WaitingReserves.t | 8 ++++++-- > 2 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Holds/CancelReserves.t b/t/db_dependent/Holds/CancelReserves.t >index deee1a9..b6d216f 100644 >--- a/t/db_dependent/Holds/CancelReserves.t >+++ b/t/db_dependent/Holds/CancelReserves.t >@@ -78,7 +78,7 @@ my $reserve3 = $builder->build({ > }, > }); > >-Koha::Cache->get_instance()->flush_all(); >+Koha::Caches->get_instance()->flush_all(); > my $holiday = $builder->build({ > source => 'SpecialHoliday', > value => { >diff --git a/t/db_dependent/Holds/WaitingReserves.t b/t/db_dependent/Holds/WaitingReserves.t >index ccd677c..e9e1814 100644 >--- a/t/db_dependent/Holds/WaitingReserves.t >+++ b/t/db_dependent/Holds/WaitingReserves.t >@@ -19,6 +19,8 @@ my $dbh = C4::Context->dbh; > $dbh->{AutoCommit} = 0; > $dbh->{RaiseError} = 1; > $dbh->do(q{DELETE FROM special_holidays}); >+$dbh->do(q{DELETE FROM repeatable_holidays}); >+$dbh->do("DELETE FROM reserves"); > > my $builder = t::lib::TestBuilder->new(); > >@@ -135,7 +137,7 @@ my $reserve1 = $builder->build({ > t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelay', 1); > t::lib::Mocks::mock_preference('ReservesMaxPickUpDelay', 6); > >-ModReserveAffect( $item1->{itemnumber}, $patron1->{borrowernumber}, 0); >+ModReserveAffect( $item1->{itemnumber}, $patron1->{borrowernumber}); > my $r = Koha::Holds->find($reserve1->{reserve_id}); > > is($r->waitingdate, $today->ymd, 'Waiting date should be set to today' ); >@@ -207,8 +209,10 @@ my $holiday2 = $builder->build({ > }, > }); > >+Koha::Caches->get_instance->flush_all; >+ > t::lib::Mocks::mock_preference('ExcludeHolidaysFromMaxPickUpDelay', 1); >-ModReserveAffect( $item3->{itemnumber}, $patron2->{borrowernumber}, 0); >+ModReserveAffect( $item3->{itemnumber}, $patron2->{borrowernumber}); > > # Add 6 days of pickup delay + 1 day of holiday. > my $expected_expiration = $today->clone; >-- >2.7.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 12063
:
26966
|
52558
|
52949
|
52950
|
53100
|
53101
|
59161
|
59162
|
59163
|
59165
|
61401
|
61440
|
61461
|
61735
|
62001
|
62002
|
62003
|
62004
|
62005
|
62474
|
63057
|
63091
|
63092
|
63093
|
63094
|
63095
|
63096
|
63097
|
63098
|
63099