refactor: integrate category handling for entries and food items in services and tests

This commit is contained in:
2026-08-07 14:34:59 -03:00
parent e1ad27ecf0
commit 11776f0734
6 changed files with 70 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ namespace Tests\Feature\FiestaFutbolInfantil;
use App\Domains\Auth\Models\User;
use App\Domains\Authorization\Enums\RoleCode;
use App\Domains\Catalog\Models\Attribute;
use App\Domains\Catalog\Models\Category;
use App\Domains\Shared\Enums\FieldType;
use App\Domains\Tenant\Models\Tenant;
use App\Domains\Tenant\Models\WebsiteType;
@@ -63,6 +64,11 @@ class FoodControllerTest extends TestCase
'tenant_code' => $tenant->codigo,
'slug' => 'comida',
'nombre' => 'Comida',
'category_id' => Category::query()
->where('tenant_code', $tenant->codigo)
->where('nombre', 'Comidas')
->sole()
->id,
'precio' => 8000,
]);
}