Lines 303-309
subtest 'orders' => sub {
Link Here
|
303 |
$schema->storage->txn_rollback; |
303 |
$schema->storage->txn_rollback; |
304 |
}; |
304 |
}; |
305 |
|
305 |
|
306 |
subtest 'closed() tests' => sub { |
306 |
subtest 'is_closed() tests' => sub { |
307 |
|
307 |
|
308 |
plan tests => 2; |
308 |
plan tests => 2; |
309 |
|
309 |
|
Lines 327-334
subtest 'closed() tests' => sub {
Link Here
|
327 |
} |
327 |
} |
328 |
); |
328 |
); |
329 |
|
329 |
|
330 |
ok( $closed_basket->closed, 'Closed basket is tested as closed' ); |
330 |
ok( $closed_basket->is_closed, 'Closed basket is tested as closed' ); |
331 |
ok( !$open_basket->closed, 'Open basket is tested as open' ); |
331 |
ok( !$open_basket->is_closed, 'Open basket is tested as open' ); |
332 |
|
332 |
|
333 |
$schema->storage->txn_rollback; |
333 |
$schema->storage->txn_rollback; |
334 |
}; |
334 |
}; |
Lines 363-369
subtest 'close() tests' => sub {
Link Here
|
363 |
|
363 |
|
364 |
$basket->close; |
364 |
$basket->close; |
365 |
|
365 |
|
366 |
ok( $basket->closed, 'Basket is closed' ); |
366 |
ok( $basket->is_closed, 'Basket is closed' ); |
367 |
my $ordered_orders = $basket->orders->search({ orderstatus => 'ordered' }); |
367 |
my $ordered_orders = $basket->orders->search({ orderstatus => 'ordered' }); |
368 |
is( $ordered_orders->count, 3, 'Only open orders have been marked as ordered' ); |
368 |
is( $ordered_orders->count, 3, 'Only open orders have been marked as ordered' ); |
369 |
|
369 |
|
370 |
- |
|
|