withRole('child')->create(); actingAs($child)->get('/school/dashboard')->assertForbidden(); }); it('erlaubt school-admin-Route für teacher (OR-Semantik)', function () { $teacher = User::factory()->withRole('teacher')->create(); actingAs($teacher)->get('/school/dashboard')->assertOk(); }); it('erlaubt school-admin-Route für school-admin (OR-Semantik)', function () { $admin = User::factory()->withRole('school-admin')->create(); actingAs($admin)->get('/school/dashboard')->assertOk(); }); it('redirected Unauthenticated to login', function () { get('/school/dashboard')->assertRedirect('/login'); });