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

(-)a/t/db_dependent/AuthoritiesMarc.t (-2 / +20 lines)
Lines 6-12 Link Here
6
use Modern::Perl;
6
use Modern::Perl;
7
7
8
use Test::NoWarnings;
8
use Test::NoWarnings;
9
use Test::More tests => 14;
9
use Test::More tests => 15;
10
use Test::MockModule;
10
use Test::MockModule;
11
use Test::Warn;
11
use Test::Warn;
12
use MARC::Field;
12
use MARC::Field;
Lines 398-400 subtest 'DelAuthority() tests' => sub { Link Here
398
398
399
    $schema->storage->txn_rollback;
399
    $schema->storage->txn_rollback;
400
};
400
};
401
- 
401
402
subtest 'BuildSummary/_marc21_sort_hierarchy_alpha' => sub {
403
    plan tests => 1;
404
    #$schema->storage->txn_begin;
405
    #t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
406
407
    my @fields;
408
    push @fields, MARC::Field->new( '550', '', '', a => 'zzz', w => 'h' );
409
    push @fields, MARC::Field->new( '550', '', '', a => 'yyy', w => 'g' );
410
    push @fields, MARC::Field->new( '550', '', '', a => 'xxx', w => 'x' );
411
    push @fields, MARC::Field->new( '550', '', '', a => 'www', w => '' );
412
    push @fields, MARC::Field->new( '550', '', '', a => 'vvv', w => 'g' );
413
    push @fields, MARC::Field->new( '550', '', '', a => 'uuu', w => 'h' );
414
415
    my @sorted_sub_a = map { $_->subfield('a') } C4::AuthoritiesMarc::_marc21_sort_hierarchy_alpha(@fields);
416
    is_deeply( \@sorted_sub_a, [ 'vvv', 'yyy', 'www', 'xxx', 'uuu', 'zzz' ], 'Sorted as expected' );
417
418
    #$schema->storage->txn_rollback;
419
};

Return to bug 41685