createUserWithPermission([]); OrganizationInvitation::factory()->forOrganization($data->organization)->create([ 'email' => 'pending@example.com', ]); $this->actingAs($data->user); // Act $response = $this->get('/teams/'.$data->organization->getKey()); // Assert $response->assertOk(); $response->assertInertia(fn (Assert $page) => $page ->missing('team.users') ->missing('team.team_invitations') ->missing('team.owner.email') ->has('team.owner.id') ->has('team.owner.name') ->has('team.owner.profile_photo_url') ); } }