Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render
This commit is contained in:
32
tests/Feature/Enhance/EnhanceModerationTest.php
Normal file
32
tests/Feature/Enhance/EnhanceModerationTest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Models\EnhanceJob;
|
||||
use App\Models\User;
|
||||
|
||||
it('allows moderators to browse enhance jobs in moderation', function (): void {
|
||||
$moderator = User::factory()->create(['role' => 'moderator']);
|
||||
$creator = User::factory()->create();
|
||||
|
||||
$job = EnhanceJob::query()->create([
|
||||
'user_id' => $creator->id,
|
||||
'status' => EnhanceJob::STATUS_COMPLETED,
|
||||
'engine' => EnhanceJob::ENGINE_STUB,
|
||||
'mode' => 'standard',
|
||||
'scale' => 2,
|
||||
]);
|
||||
|
||||
$this->actingAs($moderator)
|
||||
->get(route('admin.enhance.index'))
|
||||
->assertOk()
|
||||
->assertSee((string) $job->id);
|
||||
});
|
||||
|
||||
it('blocks regular users from the moderation enhance surface', function (): void {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->get(route('admin.enhance.index'))
|
||||
->assertForbidden();
|
||||
});
|
||||
Reference in New Issue
Block a user