|
Lines 288-294
subtest 'Merging authorities should handle deletes (BZ 18070)' => sub {
Link Here
|
| 288 |
}; |
288 |
}; |
| 289 |
|
289 |
|
| 290 |
subtest "Test some specific postponed merge issues" => sub { |
290 |
subtest "Test some specific postponed merge issues" => sub { |
| 291 |
plan tests => 4; |
291 |
plan tests => 6; |
| 292 |
|
292 |
|
| 293 |
my $authmarc = MARC::Record->new; |
293 |
my $authmarc = MARC::Record->new; |
| 294 |
$authmarc->append_fields( MARC::Field->new( '109', '', '', 'a' => 'aa', b => 'bb' )); |
294 |
$authmarc->append_fields( MARC::Field->new( '109', '', '', 'a' => 'aa', b => 'bb' )); |
|
Lines 328-333
subtest "Test some specific postponed merge issues" => sub {
Link Here
|
| 328 |
$restored_mocks->{auth_mod}->unmock_all; |
328 |
$restored_mocks->{auth_mod}->unmock_all; |
| 329 |
$biblio = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); |
329 |
$biblio = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); |
| 330 |
is( $biblio->subfield('109', '9'), $id, 'If the 109 is no longer present, another modify merge would not bring it back' ); |
330 |
is( $biblio->subfield('109', '9'), $id, 'If the 109 is no longer present, another modify merge would not bring it back' ); |
|
|
331 |
|
| 332 |
# Bug 22437 now removes older postponed A->A merges in DelAuthority |
| 333 |
$id = AddAuthority( $authmarc, undef, $authtype1 ); |
| 334 |
my $merge = Koha::Authority::MergeRequest->new({ authid => $id })->store; |
| 335 |
DelAuthority({ authid => $id, skip_merge => 1 }); |
| 336 |
$merge->discard_changes; |
| 337 |
is( $merge->in_storage, 0, 'Older merge should be removed' ); |
| 338 |
# And even if we dont pass skip_merge |
| 339 |
$id = AddAuthority( $authmarc, undef, $authtype1 ); |
| 340 |
$merge = Koha::Authority::MergeRequest->new({ authid => $id })->store; |
| 341 |
DelAuthority({ authid => $id }); |
| 342 |
$merge->discard_changes; |
| 343 |
is( $merge->in_storage, 0, 'Older merge should be removed again' ); |
| 331 |
}; |
344 |
}; |
| 332 |
|
345 |
|
| 333 |
subtest "Graceful resolution of missing reporting tag" => sub { |
346 |
subtest "Graceful resolution of missing reporting tag" => sub { |
| 334 |
- |
|
|