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

(-)a/t/db_dependent/ImportBatch.t (-3 / +5 lines)
Lines 1-7 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 14;
4
use Test::More tests => 15;
5
use utf8;
5
use File::Basename;
6
use File::Basename;
6
use File::Temp qw/tempfile/;
7
use File::Temp qw/tempfile/;
7
8
Lines 105-111 my @fields = ( Link Here
105
    ),
106
    ),
106
    MARC::Field->new(
107
    MARC::Field->new(
107
        $item_tag, ' ', ' ',
108
        $item_tag, ' ', ' ',
108
        e => 'my edition',
109
        e => 'my edition ❤',
109
        i => 'my item part',
110
        i => 'my item part',
110
    ),
111
    ),
111
    MARC::Field->new(
112
    MARC::Field->new(
Lines 122-127 AddItemsToImportBiblio( $id_import_batch1, $import_record_id, $record, 0 ); Link Here
122
my $record_from_import_biblio_with_items = C4::ImportBatch::GetRecordFromImportBiblio( $import_record_id, 'embed_items' );
123
my $record_from_import_biblio_with_items = C4::ImportBatch::GetRecordFromImportBiblio( $import_record_id, 'embed_items' );
123
$original_record->leader($record_from_import_biblio_with_items->leader());
124
$original_record->leader($record_from_import_biblio_with_items->leader());
124
is_deeply( $record_from_import_biblio_with_items, $original_record, 'GetRecordFromImportBiblio should return the record with items if specified' );
125
is_deeply( $record_from_import_biblio_with_items, $original_record, 'GetRecordFromImportBiblio should return the record with items if specified' );
126
my $utf8_field = $record_from_import_biblio_with_items->subfield($item_tag, 'e');
127
is($utf8_field, 'my edition ❤');
125
$original_record->delete_fields($original_record->field($item_tag)); #Remove items fields
128
$original_record->delete_fields($original_record->field($item_tag)); #Remove items fields
126
my $record_from_import_biblio_without_items = C4::ImportBatch::GetRecordFromImportBiblio( $import_record_id );
129
my $record_from_import_biblio_without_items = C4::ImportBatch::GetRecordFromImportBiblio( $import_record_id );
127
$original_record->leader($record_from_import_biblio_without_items->leader());
130
$original_record->leader($record_from_import_biblio_without_items->leader());
128
- 

Return to bug 24827