From 1c2329b02d9643f47dcf93aa7be9c31def4b2d91 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 5 Feb 2018 15:51:03 -0300 Subject: [PATCH] Bug 20144: [sql_modes] Set auth_header.marcxml to an empty string in tests Fix for: Field 'marcxml' doesn't have a default value Signed-off-by: Josef Moravec Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart --- t/db_dependent/Koha/Authorities.t | 4 ++-- t/lib/TestBuilder.pm | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/Authorities.t b/t/db_dependent/Koha/Authorities.t index 9fa6c73b81..321a0a9036 100644 --- a/t/db_dependent/Koha/Authorities.t +++ b/t/db_dependent/Koha/Authorities.t @@ -61,8 +61,8 @@ my $new_authority_type_1 = Koha::Authority::Type->new( summary => 'my summary for authority 1', } )->store; -my $new_authority_1 = Koha::Authority->new( { authtypecode => $new_authority_type_1->authtypecode, } )->store; -my $new_authority_2 = Koha::Authority->new( { authtypecode => $new_authority_type_1->authtypecode, } )->store; +my $new_authority_1 = Koha::Authority->new( { authtypecode => $new_authority_type_1->authtypecode, marcxml => '' } )->store; +my $new_authority_2 = Koha::Authority->new( { authtypecode => $new_authority_type_1->authtypecode, marcxml => '' } )->store; is( Koha::Authority::Types->search->count, $nb_of_authority_types + 1, 'The authority type should have been added' ); is( Koha::Authorities->search->count, $nb_of_authorities + 2, 'The 2 authorities should have been added' ); diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm index ed56e5a0d6..615fc10d3d 100644 --- a/t/lib/TestBuilder.pm +++ b/t/lib/TestBuilder.pm @@ -484,6 +484,9 @@ sub _gen_default_values { tax_rate => 0, discount => 0, }, + AuthHeader => { + marcxml => '', + }, }; } -- 2.39.5