Bug 26524: Save some processor cycles

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-09-29 16:06:19 +02:00
parent 2900cee991
commit 268dfb5455

View file

@ -290,13 +290,13 @@ subtest 'orders' => sub {
my @actual_orders;
for ( 1..10 ) {
for ( 1..3 ) {
push @actual_orders, $builder->build_object({ class => 'Koha::Acquisition::Orders', value => { basketno => $basket->id } });
}
$orders = $basket->orders;
is( ref($orders), 'Koha::Acquisition::Orders', 'Type is correct with no attached orders' );
is( $orders->count, 10, '10 orders attached, count 10' );
is( $orders->count, 3, '3 orders attached, count 3' );
$schema->storage->txn_rollback;
};