feat(purchase): implement purchase limit enforcement and custom exception handling
This commit is contained in:
@@ -340,7 +340,11 @@ class StorePurchaseTest extends TestCase
|
||||
],
|
||||
])
|
||||
->assertUnprocessable()
|
||||
->assertJsonValidationErrors('direct_items');
|
||||
->assertJsonValidationErrors('direct_items')
|
||||
->assertJsonPath('code', 'purchase.limit_exceeded')
|
||||
->assertJsonPath('catalog_item_id', $variant->catalog_item_id)
|
||||
->assertJsonPath('catalog_item_name', $variant->catalogItem->nombre)
|
||||
->assertJsonPath('maximum_addable_quantity', 1);
|
||||
|
||||
$this->actingAs($otherUser, 'sanctum')
|
||||
->postJson('/api/tenants/sonder/compras/start-checkout', [
|
||||
|
||||
Reference in New Issue
Block a user