Bug 35104: Update Exporter/Record.t fixture for the new store() validation

This test built a "bad" biblio by storing invalid MARCXML directly via
Koha::Biblio::Metadata->store(), which now rejects it. Simulate
legacy corrupt data already in the database by writing it straight to
the DBIC row, bypassing the new validation, instead.

Signed-off-by: Baptiste Bayche <baptiste.bayche@inlibro.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Sponsored-by: OpenFifth
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Martin Renvoize 2026-07-08 12:27:47 +01:00 committed by Pedro Amorim
parent 6726b1a254
commit 1b4373eea3
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 2 additions and 4 deletions

View File

@ -77,10 +77,8 @@ if ( $marcflavour eq 'UNIMARC' ) {
$homebranch_subfield_code = 'a';
}
my $bad_biblio = Koha::Biblio->new()->store();
Koha::Biblio::Metadata->new(
{ biblionumber => $bad_biblio->id, format => 'marcxml', metadata => 'something wrong', schema => $marcflavour } )
->store();
my $bad_biblio = $builder->build_sample_biblio;
$bad_biblio->metadata->_result->update( { metadata => 'something wrong' } );
my $bad_biblionumber = $bad_biblio->id;
my $item_1_1 = $builder->build_sample_item(