Skip to content

test(admin): cover cancel_admin_transfer auth and idempotency boundaries - #319

Merged
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
thlpkee20-wq:test/admin-01-boundaries
Jul 28, 2026
Merged

test(admin): cover cancel_admin_transfer auth and idempotency boundaries#319
mikewheeleer merged 1 commit into
Agentpay-Org:mainfrom
thlpkee20-wq:test/admin-01-boundaries

Conversation

@thlpkee20-wq

Copy link
Copy Markdown
Contributor

Closes #304

The admin logic already has extensive boundary coverage (the `test_i22_`
series covers auth-required for every other admin-gated entrypoint;
`test_i20_
` covers propose/accept/cancel interactions). Two boundaries
specific to `cancel_admin_transfer` had no direct test:

  • Unauthorized caller: `cancel_admin_transfer` is admin-gated like
    every other `test_i22_*` entrypoint, but had no matching auth test.
  • Idempotent no-op: cancelling with nothing pending must not panic
    and must leave both `Admin` and `PendingAdmin` unchanged — mirrors
    the idempotency contract already documented and tested for
    `pause`/`unpause`.

Test plan

cancel_admin_transfer had no direct test coverage for two boundaries
that every other admin-gated entrypoint in the i22 series already
covers:
- unauthorized caller: cancel_admin_transfer_requires_admin_auth
- idempotent no-op: cancelling with nothing pending must not panic,
  and must leave both Admin and PendingAdmin unchanged
@mikewheeleer

Copy link
Copy Markdown
Contributor

@thlpkee20-wq clean implementation, merging with thanks 🙌

@mikewheeleer
mikewheeleer merged commit 71e4657 into Agentpay-Org:main Jul 28, 2026
1 check failed
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.

Add boundary tests for the admin logic

2 participants