Group
  • Testing

    Test the links and tokens inside my emails

    Verify every link in every transactional email resolves correctly and every token does what it should, once.

    • Improve quality
    • Debug & fix
    • Beginner
    • General

Free Prompt

My app sends emails with links and tokens in them (confirmations, resets, magic links, receipts, invites), and I want tests proving those links actually work. For each email my app sends, write tests that: 1. Extract every URL from the rendered email body. 2. Assert each URL uses the correct base domain for the environment (no localhost, no staging domain in production templates, no placeholder domains like example.com). 3. Assert tokenized links (confirmations, resets, magic links, invites) contain a token of the expected format and that the token resolves to the right account and action when consumed. 4. Assert single-use tokens actually are single use: consuming the same link twice fails cleanly with a useful message, not an error page. 5. Assert expired tokens fail with a message that tells the user how to get a fresh link. Check the email templates themselves for hardcoded URLs. Any URL baked into a template as a string is a bug waiting for a domain change or an environment mixup. Flag each one. When finished, run the suite and give me a per-email report: links verified, token behavior verified, and any hardcoded URLs found.

What This Does / How This Helps

This tests the links and tokens inside your transactional emails: correct domains, working tokens, single-use enforcement, and clean expiry behavior. A broken link in a password reset or signup confirmation email is a conversion killer that's invisible in development, where localhost links work fine. It's also one of the most common launch-day bugs in vibe-coded apps, because templates get hardcoded early and never revisited. These tests catch the mixup before your first real user forwards you a screenshot.

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