feat(purchase): refactor stock reservation expiration handling and update related tests

This commit is contained in:
2026-08-26 16:36:26 -03:00
parent adc4cc9595
commit c820741e5f
7 changed files with 19 additions and 29 deletions

View File

@@ -60,9 +60,9 @@ class TelepagosWebhookTest extends TestCase
->assertJsonValidationErrors(['transfer_payer_dni']);
}
public function test_transfer_payment_intent_persists_transfer_payer_dni_without_replacing_customer_dni(): void
public function test_transfer_payment_intent_persists_data_without_extending_checkout_expiration(): void
{
config()->set('purchase.payment_expiration_minutes.transfer', 60);
config()->set('purchase.checkout_expiration_minutes', 30);
$now = now()->startOfSecond();
$this->travelTo($now);
@@ -106,7 +106,7 @@ class TelepagosWebhookTest extends TestCase
$this->assertDatabaseHas('stock_reservations', [
'id' => $purchase->stock_reservation_id,
'status' => 'active',
'expires_at' => $now->copy()->addMinutes(60)->toDateTimeString(),
'expires_at' => $now->copy()->addMinutes(30)->toDateTimeString(),
]);
$this->travelBack();