tests: Kategorie-Portal in den API-Tests festlegen

Die Kategorie-Factory würfelt das Portal; seit der Portal-Prüfung im
API-Store (Audit F11) schlug 'api submitted html text is sanitized'
zufällig mit 422 fehl.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-09-18 10:48:30 +00:00
parent 226fb8131a
commit 207f103118
5 changed files with 14 additions and 12 deletions

View file

@ -1,5 +1,6 @@
<?php
use App\Enums\Portal;
use App\Models\Category;
use App\Models\Company;
use App\Models\NewsletterSubscription;
@ -37,7 +38,7 @@ test('api user can read only own companies', function () {
test('api user can list categories with press release read ability', function () {
/** @var TestCase $this */
$user = User::factory()->create();
Category::factory()->withTranslations()->create();
Category::factory()->withTranslations()->create(['portal' => Portal::Both]);
Sanctum::actingAs($user, ['press-releases:read']);