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

(-)a/C4/Biblio.pm (-1 / +1 lines)
Lines 299-305 sub AddBiblio { Link Here
299
        });
299
        });
300
    } catch {
300
    } catch {
301
        warn $_;
301
        warn $_;
302
        return (undef, undef);
302
        ( $biblionumber, $biblioitemnumber ) = ( undef, undef );
303
    };
303
    };
304
    return ( $biblionumber, $biblioitemnumber );
304
    return ( $biblionumber, $biblioitemnumber );
305
}
305
}
(-)a/t/db_dependent/Biblio.t (-3 / +1 lines)
Lines 49-55 subtest 'AddBiblio' => sub { Link Here
49
    t::lib::Mocks::mock_preference( 'marcflavour', $marcflavour );
49
    t::lib::Mocks::mock_preference( 'marcflavour', $marcflavour );
50
    my $record = MARC::Record->new();
50
    my $record = MARC::Record->new();
51
51
52
    warn Koha::Biblios->count;
53
    my ( $f, $sf ) = GetMarcFromKohaField('biblioitems.lccn');
52
    my ( $f, $sf ) = GetMarcFromKohaField('biblioitems.lccn');
54
    my $lccn_field = MARC::Field->new( $f, ' ', ' ',
53
    my $lccn_field = MARC::Field->new( $f, ' ', ' ',
55
        $sf => 'ThisisgoingtobetoomanycharactersfortheLCCNfield' );
54
        $sf => 'ThisisgoingtobetoomanycharactersfortheLCCNfield' );
Lines 63-69 subtest 'AddBiblio' => sub { Link Here
63
    is( $biblioitemnumber, undef,
62
    is( $biblioitemnumber, undef,
64
        'AddBiblio returns undef for biblioitemnumber if something went wrong'
63
        'AddBiblio returns undef for biblioitemnumber if something went wrong'
65
    );
64
    );
66
    is( $nb_biblios, Koha::Biblios->count,
65
    is( Koha::Biblios->count, $nb_biblios,
67
        'No biblio should have been added if something went wrong' );
66
        'No biblio should have been added if something went wrong' );
68
};
67
};
69
68
70
- 

Return to bug 26518