Bug 35104: (RM follow-up) Fix regressions.t for Metadata's new auto-repair

Koha::Biblio::Metadata->store() now repairs recoverable MARCXML faults
before saving, so this test's invalid data no longer reaches the DB
and detail.pl never hits a decoding error.

Write the metadata directly via the DBIC row instead, bypassing
store()'s repair, so the test still exercises detail.pl's own
defensive handling of corrupt metadata.

Test plan:
prove t/db_dependent/selenium/regressions.t

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Pedro Amorim 2026-08-19 08:49:18 +00:00
parent 868751b221
commit 22fad96c0d
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ subtest 'Bibliographic record detail page must not explode even with invalid met
<controlfield tag="004">00satmrnu0</controlfield>
<controlfield tag="008">00ar19881981bdkldan</controlfield>
</record>};
$biblio->metadata->metadata($invalid_data)->store();
$biblio->metadata->_result->update( { metadata => $invalid_data } );
$driver->get( $base_url . "/catalogue/detail.pl?biblionumber=$biblionumber" );