Skip to content

Test the verification score contract with fixed test addresses - #46

Merged
danarnold merged 1 commit into
masterfrom
verification-score-contract
Nov 20, 2026
Merged

danarnold merged 1 commit into
masterfrom
verification-score-contract

Conversation

@danarnold

Copy link
Copy Markdown
Member

With a test key, the verify endpoint returns a random sample response for ordinary addresses, and unknown results have a null score. test_verification used jarrett@emailable.com and asserted that score was present, so it failed whenever the sample came back unknown.

  • test_verification now uses deliverable@example.com, which always returns a deliverable result with every field present.
  • New test_verification_unknown_has_no_score checks that unknown@example.com returns an unknown state with a nil score, so that side of the contract is covered on every run.

With a test key, the verify endpoint returns a random sample response
for ordinary addresses. test_verification used jarrett@emailable.com and
asserted that score was present, so it failed whenever the sample came
back unknown, since the API returns a null score for unknown results.

Use deliverable@example.com for the field presence test, and add a test
that unknown@example.com returns an unknown state with a nil score so
that side of the contract is covered on every run.
Copilot AI balanced review requested due to automatic review settings November 20, 2026 00:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

No active review issues are recorded for the test-only update targeting deterministic coverage of populated and absent verification scores.

No open issues 🎉

What changed in this PR

This PR makes verification score tests deterministic and covers both populated and absent scores without changing production code.

Changes:

  • Uses deliverable@example.com for the existing field-presence assertions, avoiding random unknown responses.
  • Adds a test that verifies unknown@example.com returns an unknown state and a nil score.
File Description
test/​emailable_test.rb Uses fixed test addresses to reliably cover deliverable and unknown score behavior.

Review effort: Balanced

@danarnold
danarnold merged commit e79285e into master Nov 20, 2026
5 checks passed
@danarnold
danarnold deleted the verification-score-contract branch November 20, 2026 00:31
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.

2 participants