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

(-)a/t/db_dependent/Biblio.t (-2 / +14 lines)
Lines 44-50 Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); Link Here
44
my $builder = t::lib::TestBuilder->new;
44
my $builder = t::lib::TestBuilder->new;
45
45
46
subtest 'AddBiblio' => sub {
46
subtest 'AddBiblio' => sub {
47
    plan tests => 4;
47
    plan tests => 5;
48
48
49
    my $marcflavour = 'MARC21';
49
    my $marcflavour = 'MARC21';
50
    t::lib::Mocks::mock_preference( 'marcflavour', $marcflavour );
50
    t::lib::Mocks::mock_preference( 'marcflavour', $marcflavour );
Lines 67-72 subtest 'AddBiblio' => sub { Link Here
67
    );
67
    );
68
    is( Koha::Biblios->count, $nb_biblios,
68
    is( Koha::Biblios->count, $nb_biblios,
69
        'No biblio should have been added if something went wrong' );
69
        'No biblio should have been added if something went wrong' );
70
71
    t::lib::Mocks::mock_preference( 'BiblioAddsAuthorities', $marcflavour );
72
    t::lib::Mocks::mock_preference( 'AutoCreateAuthorities', $marcflavour );
73
74
    my $mock_biblio = Test::MockModule->new("C4::Biblio");
75
    $mock_biblio->mock( BiblioAutoLink => sub {
76
        my $record = shift;
77
        my $frameworkcode = shift;
78
        warn "My biblionumber is ".$record->subfield('999','c')." and my frameworkcode is $frameworkcode";
79
    });
80
    warning_like { $builder->build_sample_biblio(); }
81
        qr/My biblionumber is \d+ and my frameworkcode is /, "The biblionumber is correctly passed to BiblioAutoLink";
82
70
};
83
};
71
84
72
subtest 'GetMarcSubfieldStructureFromKohaField' => sub {
85
subtest 'GetMarcSubfieldStructureFromKohaField' => sub {
73
- 

Return to bug 27577