Bug 20144: [sql_modes] Set auth_header.marcxml to an empty string in tests
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 5 Feb 2018 18:51:03 +0000 (15:51 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Feb 2018 16:58:51 +0000 (13:58 -0300)
Fix for:
Field 'marcxml' doesn't have a default value

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Koha/Authorities.t
t/lib/TestBuilder.pm

index 9fa6c73..321a0a9 100644 (file)
@@ -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' );
index ed56e5a..615fc10 100644 (file)
@@ -484,6 +484,9 @@ sub _gen_default_values {
             tax_rate => 0,
             discount => 0,
         },
+        AuthHeader => {
+            marcxml => '',
+        },
     };
 }