actingAs($user = User::factory()->withPersonalOrganization()->create()); $response = $this->post('/teams', [ 'name' => 'Test Organization', ]); $this->assertCount(2, $user->fresh()->ownedTeams); $this->assertEquals('Test Organization', $user->fresh()->ownedTeams()->latest('id')->first()->name); } }