feat(catalog): add group_order field to catalog items and update related logic
This commit is contained in:
@@ -83,11 +83,13 @@ class CatalogModelsTest extends TestCase
|
||||
public function test_catalog_item_is_the_catalog_root(): void
|
||||
{
|
||||
$item = new CatalogItem;
|
||||
$this->assertSame(0, $item->group_order);
|
||||
$item->setRawAttributes([
|
||||
'category_id' => '10',
|
||||
'brand_id' => '20',
|
||||
'inventory_id' => '30',
|
||||
'type' => CatalogItemType::Standard->value,
|
||||
'group_order' => '4',
|
||||
'precio' => '12.50',
|
||||
'inventory_policy' => InventoryPolicy::Tracked->value,
|
||||
'inventory_subject' => InventorySubject::Seat->value,
|
||||
@@ -100,6 +102,7 @@ class CatalogModelsTest extends TestCase
|
||||
$this->assertSame(20, $item->brand_id);
|
||||
$this->assertSame(30, $item->inventory_id);
|
||||
$this->assertSame(CatalogItemType::Standard, $item->type);
|
||||
$this->assertSame(4, $item->group_order);
|
||||
$this->assertSame('12.50', $item->precio);
|
||||
$this->assertSame(InventoryPolicy::Tracked, $item->inventory_policy);
|
||||
$this->assertSame(InventorySubject::Seat, $item->inventory_subject);
|
||||
|
||||
Reference in New Issue
Block a user