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

(-)a/t/db_dependent/TestBuilder.t (-1 / +2 lines)
Lines 53-59 subtest 'Start with some trivial tests' => sub { Link Here
53
53
54
    # return undef if a record exists
54
    # return undef if a record exists
55
    my $param = { source => 'Branch', value => { branchcode => 'MPL' } };
55
    my $param = { source => 'Branch', value => { branchcode => 'MPL' } };
56
    local $SIG{__WARN__} = sub {};
56
    $builder->build( $param ); # at least it should exist now
57
    $builder->build( $param ); # at least it should exist now
58
    delete local $SIG{__WARN__};
57
    warning_like { $builder->build( $param ) }
59
    warning_like { $builder->build( $param ) }
58
        qr/Violation of unique constraint/,
60
        qr/Violation of unique constraint/,
59
        'Catch warn on adding existing record';
61
        'Catch warn on adding existing record';
60
- 

Return to bug 16500