Skip to content

test(mock-oracle): cover non-admin rejection of transfer_admin - #1069

Open
gbengaeben wants to merge 1 commit into
MettaChain:mainfrom
gbengaeben:fix/1032-mock-oracle-admin-transfer-tests
Open

test(mock-oracle): cover non-admin rejection of transfer_admin#1069
gbengaeben wants to merge 1 commit into
MettaChain:mainfrom
gbengaeben:fix/1032-mock-oracle-admin-transfer-tests

Conversation

@gbengaeben

Copy link
Copy Markdown

Summary

The mock oracle's admin-transfer path was only tested for the admin success case; the admin-gated rejection was never asserted (see #1032).

Changes

  • Add non_admin_cannot_transfer_admin: asserts a non-admin caller is rejected with OracleError::Unauthorized and that the admin role is unchanged after the rejected call.

Verification

cargo test -p mock-oracle passes (18 tests).

Closes #1032

transfer_admin was only tested for the admin success path; the admin-gated
rejection was never asserted. Add a test confirming a non-admin caller is
rejected with Unauthorized and the admin role is unchanged.

Closes MettaChain#1032
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@gbengaeben Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Mock oracle reset and admin-transfer paths are untested: set/reset/transfer messages are uncovered

1 participant