Admin can now control channel creation from the admin dashboard

This commit is contained in:
2026-05-16 03:43:25 +03:30
parent 34445f3032
commit f46f32aa4c
14 changed files with 639 additions and 95 deletions

View File

@@ -30,6 +30,19 @@ class DashboardTest extends TestCase
$response->assertOk();
}
public function test_creator_dashboard_exposes_channel_creation_access(): void
{
$user = User::factory()->create(['can_create_channel' => true]);
$this->actingAs($user)
->get(route('dashboard'))
->assertOk()
->assertInertia(fn (Assert $page) => $page
->component('dashboard')
->where('canCreateChannel', true),
);
}
public function test_home_page_exposes_channel_display_media_props(): void
{
$channel = Channel::factory()->create([