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

(-)a/t/db_dependent/TestBuilder.t (-1 / +3 lines)
Lines 244-250 sub default_userpermission { Link Here
244
            privacy => 1,
244
            privacy => 1,
245
        },
245
        },
246
        module_bit => {
246
        module_bit => {
247
            flag        => 'my flag',
247
            module_bit => {
248
                flag        => 'my flag',
249
            },
248
        },
250
        },
249
        code => {
251
        code => {
250
            code        => 'my code',
252
            code        => 'my code',
(-)a/t/lib/TestBuilder.pm (-1 / +5 lines)
Lines 12-17 use Bytes::Random::Secure; Link Here
12
use Carp qw( carp );
12
use Carp qw( carp );
13
use Module::Load qw( load );
13
use Module::Load qw( load );
14
use String::Random;
14
use String::Random;
15
use Array::Utils qw( array_minus );
15
16
16
use constant {
17
use constant {
17
    SIZE_BARCODE => 20, # Not perfect but avoid to fetch the value when creating a new item
18
    SIZE_BARCODE => 20, # Not perfect but avoid to fetch the value when creating a new item
Lines 280-285 sub _buildColumnValues { Link Here
280
    my @columns = $self->schema->source($source)->columns;
281
    my @columns = $self->schema->source($source)->columns;
281
    my %unique_constraints = $self->schema->source($source)->unique_constraints();
282
    my %unique_constraints = $self->schema->source($source)->unique_constraints();
282
283
284
    my @passed_keys = grep { ref($original_value->{$_}) ne 'HASH' } keys %$original_value;
285
    my @minus = array_minus( @passed_keys, @columns );
286
    die "Error: value hash contains unrecognized columns: ". (join ',', @minus) if @minus;
287
283
    my $build_value = 5;
288
    my $build_value = 5;
284
    # we try max $build_value times if there are unique constraints
289
    # we try max $build_value times if there are unique constraints
285
    BUILD_VALUE: while ( $build_value ) {
290
    BUILD_VALUE: while ( $build_value ) {
286
- 

Return to bug 32350