Skip to content

test(serve): add coverage for unregistered token webhook fix (#23)#34

Open
peg wants to merge 1 commit intomainfrom
test/serve-unregistered
Open

test(serve): add coverage for unregistered token webhook fix (#23)#34
peg wants to merge 1 commit intomainfrom
test/serve-unregistered

Conversation

@peg
Copy link
Copy Markdown
Owner

@peg peg commented Mar 25, 2026

Adds two tests for the fix in #24:

  • TestHandleCanary_unregisteredTokenNoWebhook — fires a request for a token not in DB, verifies 200 pixel response and webhook is NOT called
  • TestHandleCanary_registeredTokenFiresWebhook — registers a token, fires request, verifies webhook IS called

Add TestHandleCanary_unregisteredTokenNoWebhook to verify that
processAlert returns early without firing a webhook when the token
is not registered in the DB. Add the positive counterpart
TestHandleCanary_registeredTokenFiresWebhook to confirm registered
tokens do trigger webhook delivery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant