Group
  • Testing

    Test my destructive actions: deletes, cancels, and data wipes

    Verify every destructive action confirms intent, handles authorization, and cleans up related data correctly.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General

Free Prompt

My app has destructive actions: deleting records, canceling subscriptions, wiping accounts. I want tests proving these behave exactly right, because mistakes here are unrecoverable. First, list every destructive action in my app and what it cascades to (deleting a user deletes their posts? their files? their team's data?). Then write tests covering, for each action: 1. Authorization: only the right user (owner or admin) can trigger it. Another user cannot delete my stuff. 2. Scope: the action deletes or cancels exactly what it should, nothing more. Deleting one record must not touch unrelated records. 3. Cascades: related data is handled the intended way, whether that's deletion, anonymization, or being kept. Assert the actual final state of the database. 4. Financial side effects: a canceled subscription stops future billing, a deleted account doesn't get charged again next cycle. If my payment provider is involved, use the mocked version, not live calls. 5. Irreversibility UX: the server requires whatever confirmation step my UI promises (a typed confirmation, a second request), and doesn't accept a bare unconfirmed call if the flow says otherwise. 6. Post-deletion behavior: requests to the deleted resource return clean 404s, and any lingering links or references don't crash the app. When finished, run the suite and summarize what each destructive action provably does. Flag anything where the actual behavior differs from what the UI tells the user will happen.

What This Does / How This Helps

This tests your app's destructive actions: who can trigger them, what they cascade to, whether canceled subscriptions actually stop billing, and whether the app stays coherent afterward. Destructive-action bugs have no undo. A delete that takes out the wrong records, an account deletion that keeps billing the customer, or a cascade that wipes a team's shared data are the kind of bugs that end businesses via chargebacks and screenshots. They're also rarely tested because testing them by hand is nerve-wracking, which is exactly why they belong in an automated suite.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts