normogen/backend/tests
goose e28135bc08
Some checks failed
Lint and Build / format (pull_request) Successful in 36s
Lint and Build / clippy (pull_request) Successful in 1m39s
Lint and Build / build (pull_request) Successful in 3m44s
Lint and Build / test (pull_request) Failing after 3m43s
test(share): fix query-string encoding + write-status assertion
Three share_tests were failing in CI:

1. public_key_lookup_returns_recipient_identity_key — passed the email
   as a JSON body on a GET, but send_json builds the URI verbatim and
   ignores the body for GET. The query string was never formed, so the
   handler got an empty email. Fix: put ?email=... in the URI directly
   (URL-encoding the '@').

2. public_key_lookup_404s_for_unknown_or_keyless_user — same root cause.

3. owner_shares_recipient_reads_owner_revokes — asserted the recipient's
   write would return 201 or 403, but create_medication returns 200 OK
   (Axum's default for Ok(Json(...))), and the write currently succeeds
   because the create handler doesn't check ownership (issue #12). The
   write is attributed to the recipient, not the owner, so the owner's
   data is still untouched — which is what the test really wants to
   prove. Accept 200 (current) or 403 (once #12 lands); documented the
   tie to #12.
2026-07-19 10:37:40 -03:00
..
common feat(backend): dose scheduling + health stats zero-knowledge 2026-07-04 08:41:48 -03:00
auth_tests.rs feat(auth): add per-account X25519 identity keypair (#3) 2026-07-18 20:00:01 -03:00
medication_tests.rs test: E2E ZK integration tests + frontend lifecycle test 2026-07-05 00:35:33 -03:00
profile_tests.rs feat: per-profile DEKs + multi-profile (Phase A2, #3) 2026-07-18 23:45:01 -03:00
share_tests.rs test(share): fix query-string encoding + write-status assertion 2026-07-19 10:37:40 -03:00
zk_integration_tests.rs feat: per-profile DEKs + multi-profile (Phase A2, #3) 2026-07-18 23:45:01 -03:00