test(stock): cover aggregate reservation lifecycle
This commit is contained in:
@@ -12,7 +12,7 @@ use Tests\TestCase;
|
||||
|
||||
class ExpireStockReservationsServiceTest extends TestCase
|
||||
{
|
||||
public function test_it_expires_purchases_before_abandoned_cart_items(): void
|
||||
public function test_it_expires_purchases_before_abandoned_cart_reservations(): void
|
||||
{
|
||||
$checkout = \Mockery::mock(CheckoutService::class);
|
||||
$checkout->shouldReceive('expireOverduePurchases')
|
||||
@@ -36,7 +36,7 @@ class ExpireStockReservationsServiceTest extends TestCase
|
||||
->with('Stock reservation cleanup completed.', [
|
||||
'command' => 'reservations:expire',
|
||||
'expired_purchases' => 2,
|
||||
'expired_cart_items' => 3,
|
||||
'expired_cart_reservations' => 3,
|
||||
'total_expired' => 5,
|
||||
]);
|
||||
|
||||
@@ -44,7 +44,7 @@ class ExpireStockReservationsServiceTest extends TestCase
|
||||
|
||||
$this->assertSame([
|
||||
'purchases' => 2,
|
||||
'cart_items' => 3,
|
||||
'cart_reservations' => 3,
|
||||
], $result);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class ExpireStockReservationsServiceTest extends TestCase
|
||||
->with('Stock reservation cleanup failed.', [
|
||||
'command' => 'reservations:expire',
|
||||
'expired_purchases' => 2,
|
||||
'expired_cart_items' => null,
|
||||
'expired_cart_reservations' => null,
|
||||
'exception' => $exception,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user