View | Details | Raw Unified | Return to bug 24480
Collapse All | Expand All

(-)a/t/SimpleMARC.t (-3 / +3 lines)
Lines 386-392 subtest 'copy_field' => sub { Link Here
386
          read_field( { record => $record, field => '651', subfield => 'a' } );
386
          read_field( { record => $record, field => '651', subfield => 'a' } );
387
        is_deeply(
387
        is_deeply(
388
            \@fields_651a,
388
            \@fields_651a,
389
            [ 'Computer algorithms.' , 'Computer programming.' ],
389
            [ 'Computer algorithms.', 'Computer programming.' ],
390
            'Copy multivalued field'
390
            'Copy multivalued field'
391
        );
391
        );
392
        delete_field( { record => $record, field => '651' } );
392
        delete_field( { record => $record, field => '651' } );
Lines 904-910 subtest 'copy_field' => sub { Link Here
904
                    { record => $record, field => '650', field_numbers => [2] }
904
                    { record => $record, field => '650', field_numbers => [2] }
905
                )
905
                )
906
            ],
906
            ],
907
            [ 'The art of computer programming', 'Donald E. Knuth.' ],
907
            [ 'Computer programming.', '462' ],
908
            'Copy a field to existent fields should create a new field'
908
            'Copy a field to existent fields should create a new field'
909
        );
909
        );
910
        is_deeply(
910
        is_deeply(
Lines 913-919 subtest 'copy_field' => sub { Link Here
913
                    { record => $record, field => '650', field_numbers => [1] }
913
                    { record => $record, field => '650', field_numbers => [1] }
914
                )
914
                )
915
            ],
915
            ],
916
            [ 'Computer programming.', '462' ],
916
            [ 'The art of computer programming', 'Donald E. Knuth.' ],
917
            'Copy a field to existent fields should create a new field, the original one should not have been updated'
917
            'Copy a field to existent fields should create a new field, the original one should not have been updated'
918
        );
918
        );
919
    };
919
    };
(-)a/t/db_dependent/MarcModificationTemplates.t (-8 / +7 lines)
Lines 282-289 my @fields_245a = Koha::SimpleMARC::read_field({ Link Here
282
    subfield => 'a',
282
    subfield => 'a',
283
});
283
});
284
is_deeply( \@fields_245a, [
284
is_deeply( \@fields_245a, [
285
        'The art of computer programming',
286
        'Bad title',
285
        'Bad title',
286
        'The art of computer programming',
287
        'Bad title',
287
        'Bad title',
288
    ], 'Copy field has copied the "Bad title"' );
288
    ], 'Copy field has copied the "Bad title"' );
289
289
Lines 305-312 is( ModifyRecordWithTemplate( $template_id, $record ), undef, "The ModifyRecordW Link Here
305
    subfield => 'a',
305
    subfield => 'a',
306
});
306
});
307
is_deeply( \@fields_245a, [
307
is_deeply( \@fields_245a, [
308
        'The art of computer programming',
309
        'Bad title updated',
308
        'Bad title updated',
309
        'The art of computer programming',
310
        'Bad title',
310
        'Bad title',
311
    ], 'update_field has update first the "Bad title"' );
311
    ], 'update_field has update first the "Bad title"' );
312
312
Lines 328-337 is( ModifyRecordWithTemplate( $template_id, $record ), undef, "The ModifyRecordW Link Here
328
    subfield => 'a',
328
    subfield => 'a',
329
});
329
});
330
is_deeply( \@fields_245a, [
330
is_deeply( \@fields_245a, [
331
        'The art of computer programming',
332
        'Bad title updated',
331
        'Bad title updated',
333
        'Bad title',
334
        'Bad title updated',
332
        'Bad title updated',
333
        'The art of computer programming',
334
        'Bad title',
335
    ], 'Copy field has copied first "^Bad title"' );
335
    ], 'Copy field has copied first "^Bad title"' );
336
336
337
# Delete first ^Bad title
337
# Delete first ^Bad title
Lines 351-359 is( ModifyRecordWithTemplate( $template_id, $record ), undef, "The ModifyRecordW Link Here
351
    subfield => 'a',
351
    subfield => 'a',
352
});
352
});
353
is_deeply( \@fields_245a, [
353
is_deeply( \@fields_245a, [
354
        'Bad title updated',
354
        'The art of computer programming',
355
        'The art of computer programming',
355
        'Bad title',
356
        'Bad title',
356
        'Bad title updated',
357
    ], 'delete field has been deleted the right field"' );
357
    ], 'delete field has been deleted the right field"' );
358
358
359
is( AddModificationTemplateAction(
359
is( AddModificationTemplateAction(
Lines 740-751 sub expected_record_0 { Link Here
740
            a => 'Appolo',
740
            a => 'Appolo',
741
        ),
741
        ),
742
        MARC::Field->new(
742
        MARC::Field->new(
743
            690, ' ', ' ',
743
            690, ' ', '0',
744
            0 => 'Zeroth',
744
            0 => 'Zeroth',
745
            a => 'Appolo',
745
            a => 'Appolo',
746
        ),
746
        ),
747
        MARC::Field->new(
747
        MARC::Field->new(
748
            690, ' ', '0',
748
            690, ' ', ' ',
749
            0 => 'Zeroth',
749
            0 => 'Zeroth',
750
            a => 'Appolo',
750
            a => 'Appolo',
751
        ),
751
        ),
752
- 

Return to bug 24480