create(); $user->refresh(); $pid = $user->profile_id; $status = Status::factory()->create([ 'profile_id' => $pid, 'caption' => 'edited to redact', 'type' => 'text', 'scope' => 'public', ]); // Prior + current caption versions, as UpdateStatusService records them. StatusEdit::create([ 'status_id' => $status->id, 'profile_id' => $pid, 'caption' => 'original sensitive text', ]); StatusEdit::create([ 'status_id' => $status->id, 'profile_id' => $pid, 'caption' => 'edited to redact', ]); expect(StatusEdit::whereProfileId($pid)->count())->toBe(2); (new DeleteAccountPipeline($user))->handle(); // Edit history is hard-deleted; no prior caption text is left behind. expect(StatusEdit::whereProfileId($pid)->count())->toBe(0); });