feat: implement multi-tenant cart system with stock reservation and inventory tracking
This commit is contained in:
@@ -143,10 +143,10 @@ class ProductControllerTest extends TestCase
|
||||
|
||||
$this->assertDatabaseHas('productos_variantes', [
|
||||
'producto_id' => $product->id,
|
||||
'stock' => 10,
|
||||
'stock_real' => 10,
|
||||
]);
|
||||
|
||||
$variantS = ProductVariant::where('producto_id', $product->id)->where('stock', 10)->firstOrFail();
|
||||
$variantS = ProductVariant::where('producto_id', $product->id)->where('stock_real', 10)->firstOrFail();
|
||||
$this->assertDatabaseHas('productos_variantes_values', [
|
||||
'producto_variante_id' => $variantS->id,
|
||||
'products_attribute_id' => $productAttributes['size']->id,
|
||||
@@ -321,7 +321,7 @@ class ProductControllerTest extends TestCase
|
||||
// Variant should still exist untouched
|
||||
$this->assertDatabaseHas('productos_variantes', [
|
||||
'id' => $v1->id,
|
||||
'stock' => 5,
|
||||
'stock_real' => 5,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user