Bugzilla – Attachment 71431 Details for
Bug 20144
Test suite is failing with new default SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20144: [sql_modes] Set issuingrules.no_auto_renewal_after to NULL in tests
Bug-20144-sqlmodes-Set-issuingrulesnoautorenewalaf.patch (text/plain), 2.63 KB, created by
Julian Maurice
on 2018-02-12 10:37:15 UTC
(
hide
)
Description:
Bug 20144: [sql_modes] Set issuingrules.no_auto_renewal_after to NULL in tests
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-12 10:37:15 UTC
Size:
2.63 KB
patch
obsolete
>From 895581a2ace97313e3ea7f4d966fbde372d73af2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 5 Feb 2018 18:02:12 -0300 >Subject: [PATCH] Bug 20144: [sql_modes] Set issuingrules.no_auto_renewal_after > to NULL in tests > >Fix for: >Incorrect integer value: '' for column 'no_auto_renewal_after' > >FIXME - must we update values for existing installs? >TODO - check if can be set to an empty string from the interface > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/Circulation.t | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 570ae3c0e7..f4ff1778f0 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -775,7 +775,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > my $ten_days_before = dt_from_string->add( days => -10 ); > my $ten_days_ahead = dt_from_string->add( days => 10 ); > AddIssue( $renewing_borrower, $item_to_auto_renew->{barcode}, $ten_days_ahead, undef, $ten_days_before, undef, { auto_renew => 1 } ); >- $dbh->do('UPDATE issuingrules SET norenewalbefore = 7, no_auto_renewal_after = "", no_auto_renewal_after_hard_limit = NULL'); >+ $dbh->do('UPDATE issuingrules SET norenewalbefore = 7, no_auto_renewal_after = NULL, no_auto_renewal_after_hard_limit = NULL'); > my $latest_auto_renew_date = GetLatestAutoRenewDate( $renewing_borrowernumber, $item_to_auto_renew->{itemnumber} ); > is( $latest_auto_renew_date, undef, 'GetLatestAutoRenewDate should return undef if no_auto_renewal_after or no_auto_renewal_after_hard_limit are not defined' ); > my $five_days_before = dt_from_string->add( days => -5 ); >@@ -793,7 +793,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > 'GetLatestAutoRenewDate should return +5 days if no_auto_renewal_after = 15 and date_due is 10 days before' > ); > my $two_days_ahead = dt_from_string->add( days => 2 ); >- $dbh->do('UPDATE issuingrules SET norenewalbefore = 10, no_auto_renewal_after = "", no_auto_renewal_after_hard_limit = ?', undef, dt_from_string->add( days => 2 ) ); >+ $dbh->do('UPDATE issuingrules SET norenewalbefore = 10, no_auto_renewal_after = NULL, no_auto_renewal_after_hard_limit = ?', undef, dt_from_string->add( days => 2 ) ); > $latest_auto_renew_date = GetLatestAutoRenewDate( $renewing_borrowernumber, $item_to_auto_renew->{itemnumber} ); > is( $latest_auto_renew_date->truncate( to => 'day' ), > $two_days_ahead->truncate( to => 'day' ), >-- >2.14.2
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 20144
:
71410
|
71411
|
71412
|
71413
|
71414
|
71415
|
71416
|
71417
|
71418
|
71419
|
71420
|
71421
|
71422
|
71423
|
71424
|
71425
|
71427
|
71428
|
71429
|
71430
| 71431 |
71432
|
71434
|
71435
|
71436
|
71437
|
71438
|
71440
|
71441
|
71442
|
71443
|
71444
|
71445
|
71446
|
71447
|
71448
|
71449
|
71450
|
71451
|
71452
|
71453
|
71454
|
71455
|
71456
|
71457
|
71458
|
71459
|
71460
|
71461
|
71462
|
71463
|
71467
|
71564