feat(events): add event categories and filtering

This commit is contained in:
2026-09-21 09:16:28 -03:00
parent b0702b7e15
commit 79d402e210
13 changed files with 134 additions and 8 deletions

View File

@@ -23,6 +23,22 @@ class BootstrapTenantControllerTest extends TestCase
{
use RefreshDatabase;
public function test_multi_event_bootstrap_returns_event_categories_instead_of_catalog_categories(): void
{
$this->seed(WebsiteTypeSeeder::class);
$tenant = $this->createTenant();
$tenant->update(['storefront_website_type_code' => 'onticket_multi_event']);
$tenant->categories()->create(['nombre' => 'Producto']);
$eventCategory = $tenant->eventCategories()->create(['nombre' => 'Música']);
$this->getJson('/api/tenants/bootstrap?dominio=acme.com&path=%2F')
->assertOk()
->assertJsonCount(1, 'data.categories')
->assertJsonPath('data.categories.0.id', $eventCategory->id)
->assertJsonPath('data.categories.0.nombre', 'Música')
->assertJsonPath('data.categories.0.subcategories', []);
}
public function test_it_bootstraps_a_tenant_by_domain(): void
{
$hdrKey = (string) Str::uuid();