test: add feature tests for product creation, variant management, and attribute synchronization
This commit is contained in:
@@ -296,10 +296,7 @@ class ProductControllerTest extends TestCase
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$v1 = $product->variants()->create([
|
$v1 = $product->variants()->create([
|
||||||
'slug' => 'short-running-m',
|
|
||||||
'nombre' => 'Short Running M',
|
|
||||||
'stock' => 5,
|
'stock' => 5,
|
||||||
'precio' => 8000.00,
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$payload = [
|
$payload = [
|
||||||
@@ -324,7 +321,6 @@ class ProductControllerTest extends TestCase
|
|||||||
// Variant should still exist untouched
|
// Variant should still exist untouched
|
||||||
$this->assertDatabaseHas('productos_variantes', [
|
$this->assertDatabaseHas('productos_variantes', [
|
||||||
'id' => $v1->id,
|
'id' => $v1->id,
|
||||||
'slug' => 'short-running-m',
|
|
||||||
'stock' => 5,
|
'stock' => 5,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user