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

(-)a/t/db_dependent/Exporter/Record.t (-5 / +4 lines)
Lines 444-450 subtest 'export xml with marc modification template' => sub { Link Here
444
    plan tests => 2;
444
    plan tests => 2;
445
445
446
    my $template_id = C4::MarcModificationTemplates::AddModificationTemplate('test exporter');
446
    my $template_id = C4::MarcModificationTemplates::AddModificationTemplate('test exporter');
447
    C4::MarcModificationTemplates::AddModificationTemplateAction($template_id, 'add_field', 0, '999', '9', 'Foobar');
447
    C4::MarcModificationTemplates::AddModificationTemplateAction($template_id, 'add_field', 0, '998', '9', 'Foobar');
448
448
449
    my $generated_xml_file = '/tmp/test_export.xml';
449
    my $generated_xml_file = '/tmp/test_export.xml';
450
    Koha::Exporter::Record::export({
450
    Koha::Exporter::Record::export({
Lines 465-478 subtest 'export xml with marc modification template' => sub { Link Here
465
    }
465
    }
466
    is( scalar( @records ), 1, 'Export XML: 1 record should have been exported' );
466
    is( scalar( @records ), 1, 'Export XML: 1 record should have been exported' );
467
    my $record = $records[0];
467
    my $record = $records[0];
468
    is( $record->subfield('999', '9'), 'Foobar', 'Export XML: marc modification template should have added 999$9' );
468
    is( $record->subfield('998', '9'), 'Foobar', 'Export XML: marc modification template should have added 998$9' );
469
};
469
};
470
470
471
subtest 'export iso2709 with marc modification template' => sub {
471
subtest 'export iso2709 with marc modification template' => sub {
472
    plan tests => 2;
472
    plan tests => 2;
473
473
474
    my $template_id = C4::MarcModificationTemplates::AddModificationTemplate('test exporter');
474
    my $template_id = C4::MarcModificationTemplates::AddModificationTemplate('test exporter');
475
    C4::MarcModificationTemplates::AddModificationTemplateAction($template_id, 'add_field', 0, '999', '9', 'Foobar');
475
    C4::MarcModificationTemplates::AddModificationTemplateAction($template_id, 'add_field', 0, '998', '9', 'Foobar');
476
476
477
    my $generated_mrc_file = '/tmp/test_export.mrc';
477
    my $generated_mrc_file = '/tmp/test_export.mrc';
478
    Koha::Exporter::Record::export({
478
    Koha::Exporter::Record::export({
Lines 490-496 subtest 'export iso2709 with marc modification template' => sub { Link Here
490
    }
490
    }
491
    is( scalar( @records ), 1, 'Export ISO2709: 1 record should have been exported' );
491
    is( scalar( @records ), 1, 'Export ISO2709: 1 record should have been exported' );
492
    my $record = $records[0];
492
    my $record = $records[0];
493
    is( $record->subfield('999', '9'), 'Foobar', 'Export ISO2709: marc modification template should have added 999$9' );
493
    is( $record->subfield('998', '9'), 'Foobar', 'Export ISO2709: marc modification template should have added 998$9' );
494
};
494
};
495
495
496
$schema->storage->txn_rollback;
496
$schema->storage->txn_rollback;
497
- 

Return to bug 24679