Bugzilla – Attachment 71467 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] Do not store 0000-00-00
Bug-20144-sqlmodes-Do-not-store-0000-00-00.patch (text/plain), 2.46 KB, created by
Julian Maurice
on 2018-02-12 13:42:25 UTC
(
hide
)
Description:
Bug 20144: [sql_modes] Do not store 0000-00-00
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-12 13:42:25 UTC
Size:
2.46 KB
patch
obsolete
>From b58fce93270e5691a0f515a205b7072cc70f2787 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 5 Feb 2018 16:32:26 -0300 >Subject: [PATCH] Bug 20144: [sql_modes] Do not store 0000-00-00 > >This patch needs to be linked with bug 20145. > >Fix for: >Incorrect date value: '0000-00-00' for column 'dateexpiry' > >We cannot longer store 0000-00-00, but no need to. >The tests must be kept for now as long as bug 20145 has a solution > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/Koha/Patrons.t | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index d793996793..4722807e8f 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -190,8 +190,8 @@ subtest 'is_expired' => sub { > $patron = Koha::Patrons->find( $patron->{borrowernumber} ); > $patron->dateexpiry( undef )->store->discard_changes; > is( $patron->is_expired, 0, 'Patron should not be considered expired if dateexpiry is not set'); >- $patron->dateexpiry( '0000-00-00' )->store->discard_changes; >- is( $patron->is_expired, 0, 'Patron should not be considered expired if dateexpiry is not 0000-00-00'); >+ $patron->dateexpiry( '0000-00-00' ); >+ is( $patron->is_expired, 0, 'Patron should not be considered expired if dateexpiry is 0000-00-00'); > $patron->dateexpiry( dt_from_string )->store->discard_changes; > is( $patron->is_expired, 0, 'Patron should not be considered expired if dateexpiry is today'); > $patron->dateexpiry( dt_from_string->add( days => 1 ) )->store->discard_changes; >@@ -208,8 +208,8 @@ subtest 'is_going_to_expire' => sub { > $patron = Koha::Patrons->find( $patron->{borrowernumber} ); > $patron->dateexpiry( undef )->store->discard_changes; > is( $patron->is_going_to_expire, 0, 'Patron should not be considered going to expire if dateexpiry is not set'); >- $patron->dateexpiry( '0000-00-00' )->store->discard_changes; >- is( $patron->is_going_to_expire, 0, 'Patron should not be considered going to expire if dateexpiry is not 0000-00-00'); >+ $patron->dateexpiry( '0000-00-00' ); >+ is( $patron->is_going_to_expire, 0, 'Patron should not be considered going to expire if dateexpiry is 0000-00-00'); > > t::lib::Mocks::mock_preference('NotifyBorrowerDeparture', 0); > $patron->dateexpiry( dt_from_string )->store->discard_changes; >-- >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