feat: enable ticketing for Fiesta Futbol Infantil catalog items; update services, migrations, seeders, and tests to reflect changes
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Domains\Attachable\Models\Attachment;
|
||||
use App\Domains\Auth\Models\User;
|
||||
use App\Domains\Authorization\Enums\RoleCode;
|
||||
use App\Domains\Catalog\Models\Attribute;
|
||||
use App\Domains\Catalog\Models\CatalogItem;
|
||||
use App\Domains\Menu\Models\Menu;
|
||||
use App\Domains\Shared\Enums\FieldType;
|
||||
use App\Domains\Tenant\Models\Tenant;
|
||||
@@ -75,6 +76,7 @@ class AccommodationControllerTest extends TestCase
|
||||
'label' => 'Carpa',
|
||||
]);
|
||||
$this->assertDatabaseCount('catalog_items', 1);
|
||||
$this->assertTrue(CatalogItem::query()->sole()->has_tickets);
|
||||
$this->assertDatabaseCount('variantes', 2);
|
||||
$this->assertDatabaseCount('inventories', 2);
|
||||
$this->assertDatabaseCount('variant_values', 2);
|
||||
|
||||
@@ -89,6 +89,7 @@ class FoodControllerTest extends TestCase
|
||||
'tenant_code' => $tenant->codigo,
|
||||
'slug' => 'comida',
|
||||
'nombre' => 'Comida',
|
||||
'has_tickets' => true,
|
||||
'category_id' => Category::query()
|
||||
->where('tenant_code', $tenant->codigo)
|
||||
->where('nombre', 'Comidas')
|
||||
|
||||
@@ -90,6 +90,7 @@ class MerchandiseControllerTest extends TestCase
|
||||
'precio' => 95000,
|
||||
'max_units_per_user' => 3,
|
||||
'inventory_policy' => 'tracked',
|
||||
'has_tickets' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,12 @@ class FiestaFutbolInfantilProductSeederTest extends TestCase
|
||||
['abono', 'alojamiento', 'camiseta', 'comida'],
|
||||
CatalogItem::query()->where('tenant_code', $tenant->codigo)->orderBy('slug')->pluck('slug')->all(),
|
||||
);
|
||||
$this->assertTrue(
|
||||
CatalogItem::query()
|
||||
->where('tenant_code', $tenant->codigo)
|
||||
->get()
|
||||
->every(fn (CatalogItem $item): bool => $item->has_tickets),
|
||||
);
|
||||
|
||||
$expectedVariantCounts = [
|
||||
'camiseta' => 12,
|
||||
|
||||
Reference in New Issue
Block a user