actingAs($user = User::factory()->withPersonalOrganization()->create()); $user->currentTeam->users()->attach( $otherUser = User::factory()->create(), ['role' => 'admin'] ); // Act $response = $this->delete('/teams/'.$user->currentTeam->id.'/members/'.$otherUser->id); // Assert $response->assertStatus(403); $response->assertSee('Moved to API'); } }