From f605be1cdd7000e32724aafc34c83be9718d5c3d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 6 Sep 2016 10:40:28 +0100 Subject: [PATCH] Bug 14637: Fix add patron category under MySQL 5.7 - tests Signed-off-by: Josef Moravec Signed-off-by: Kyle M Hall Signed-off-by: Kyle M Hall (cherry picked from commit 5ea0b70dad5213292cb678f38a8b93e5118bdf4d) Signed-off-by: Katrin Fischer --- t/db_dependent/Koha/Patron/Categories.t | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/db_dependent/Koha/Patron/Categories.t b/t/db_dependent/Koha/Patron/Categories.t index 58670f7e83..767eb5a4d8 100644 --- a/t/db_dependent/Koha/Patron/Categories.t +++ b/t/db_dependent/Koha/Patron/Categories.t @@ -103,6 +103,16 @@ subtest 'BlockExpiredPatronOpacActions' => sub { $retrieved_category_1->delete; is( Koha::Patron::Categories->search->count, $nb_of_categories + 1, 'Delete should have deleted the patron category' ); +my $new_category_4 = Koha::Patron::Category->new( + { categorycode => 'mycatcodeW', + category_type => 'A', + description => 'mycatdescW', + upperagelimit => '', + dateofbirthrequired => '', + } +)->store; +is( Koha::Patron::Categories->search->count, $nb_of_categories + 2, 'upperagelimit and dateofbirthrequired should have a default value if empty string is passed' ); + $schema->storage->txn_rollback; 1; -- 2.39.5