Lines 290-302
subtest 'orders' => sub {
Link Here
|
290 |
|
290 |
|
291 |
my @actual_orders; |
291 |
my @actual_orders; |
292 |
|
292 |
|
293 |
for ( 1..10 ) { |
293 |
for ( 1..3 ) { |
294 |
push @actual_orders, $builder->build_object({ class => 'Koha::Acquisition::Orders', value => { basketno => $basket->id } }); |
294 |
push @actual_orders, $builder->build_object({ class => 'Koha::Acquisition::Orders', value => { basketno => $basket->id } }); |
295 |
} |
295 |
} |
296 |
|
296 |
|
297 |
$orders = $basket->orders; |
297 |
$orders = $basket->orders; |
298 |
is( ref($orders), 'Koha::Acquisition::Orders', 'Type is correct with no attached orders' ); |
298 |
is( ref($orders), 'Koha::Acquisition::Orders', 'Type is correct with no attached orders' ); |
299 |
is( $orders->count, 10, '10 orders attached, count 10' ); |
299 |
is( $orders->count, 3, '3 orders attached, count 3' ); |
300 |
|
300 |
|
301 |
$schema->storage->txn_rollback; |
301 |
$schema->storage->txn_rollback; |
302 |
}; |
302 |
}; |
303 |
- |
|
|