Bugzilla – Attachment 63099 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: [QA Follow-up] Small change of two test scripts
Bug-12063-QA-Follow-up-Small-change-of-two-test-sc.patch (text/plain), 2.14 KB, created by
Marcel de Rooy
on 2017-05-04 12:23:38 UTC
(
hide
)
Description:
Bug 12063: [QA Follow-up] Small change of two test scripts
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-05-04 12:23:38 UTC
Size:
2.14 KB
patch
obsolete
>From c793b7eda514e87221111b5d445a2104337e0d38 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 4 May 2017 14:15:51 +0200 >Subject: [PATCH] Bug 12063: [QA Follow-up] Small change of two test scripts >Content-Type: text/plain; charset=utf-8 > >Removing dbh from one script, changing rollback in the other. >Schema is leading now. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Holds/CancelReserves.t | 7 ++----- > t/db_dependent/Holds/WaitingReserves.t | 4 +--- > 2 files changed, 3 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/Holds/CancelReserves.t b/t/db_dependent/Holds/CancelReserves.t >index 302b155..6c2a7c2 100644 >--- a/t/db_dependent/Holds/CancelReserves.t >+++ b/t/db_dependent/Holds/CancelReserves.t >@@ -14,11 +14,6 @@ use_ok('C4::Reserves'); > > my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; >- >-my $dbh = C4::Context->dbh; >-$dbh->{AutoCommit} = 0; >-$dbh->{RaiseError} = 1; >- > my $builder = t::lib::TestBuilder->new(); > > t::lib::Mocks::mock_preference('ExpireReservesOnHolidays', 0); >@@ -99,3 +94,5 @@ t::lib::Mocks::mock_preference('ExpireReservesOnHolidays', 1); > CancelExpiredReserves(); > $r3 = Koha::Holds->find($reserve3->{reserve_id}); > is($r3, undef,'Reserve 3 should be canceled.'); >+ >+$schema->storage->txn_rollback; >diff --git a/t/db_dependent/Holds/WaitingReserves.t b/t/db_dependent/Holds/WaitingReserves.t >index e9e1814..292061d 100644 >--- a/t/db_dependent/Holds/WaitingReserves.t >+++ b/t/db_dependent/Holds/WaitingReserves.t >@@ -16,8 +16,6 @@ my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; > > 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"); >@@ -243,4 +241,4 @@ ModReserveAffect( $item4->{itemnumber}, $patron2->{borrowernumber}, 0, $reserve4 > my $r4 = Koha::Holds->find($reserve4->{reserve_id}); > is($r4->expirationdate, $requested_expiredate->ymd, 'Requested expiration date should be kept' ); > >-$dbh->rollback; >\ No newline at end of file >+$schema->storage->txn_rollback; >-- >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 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