feat(events): add event categories and filtering
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user