Bug 24149: Skip Koha::Statistics for TestBuilder tests
As statistics does not have a PK we need to adjust the TestBuilder tests. Bug 18441 already exists for adding the PK. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
9597a384f3
commit
88d699fece
|
|
@ -395,7 +395,7 @@ subtest 'build_object() tests' => sub {
|
|||
eval "require $module";
|
||||
my $object = $builder->build_object( { class => $module } );
|
||||
is( ref($object), $module->object_class, "Testing $module" );
|
||||
if ( $module ne 'Koha::Old::Patrons' ) { # FIXME deletedborrowers does not have a PK
|
||||
if ( ! grep {$module eq $_ } qw( Koha::Old::Patrons Koha::Statistics ) ) { # FIXME deletedborrowers and statistics do not have a PK
|
||||
eval {$object->get_from_storage};
|
||||
is( $@, '', "Module $module should have koha_object[s]_class method if needed" );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ sub build_object {
|
|||
my $object;
|
||||
if ( $class eq 'Koha::Old::Patrons' ) {
|
||||
$object = $class->search({ borrowernumber => $hashref->{borrowernumber} })->next;
|
||||
} elsif ( $class eq 'Koha::Statistics' ) {
|
||||
$object = $class->search({ datetime => $hashref->{datetime} })->next;
|
||||
} else {
|
||||
my @ids;
|
||||
my @pks = $self->schema->source( $class->_type )->primary_columns;
|
||||
|
|
|
|||
Loading…
Reference in New Issue