Skip to content

test(treasury): granular mock_auths for initialize/deposit/withdraw auth - #791

Merged
aji70 merged 1 commit into
MyFanss:mainfrom
favourawaku:feat/treasury-mock-auths-granular-tests
Apr 23, 2026
Merged

test(treasury): granular mock_auths for initialize/deposit/withdraw auth#791
aji70 merged 1 commit into
MyFanss:mainfrom
favourawaku:feat/treasury-mock-auths-granular-tests

Conversation

@favourawaku

Copy link
Copy Markdown
Contributor

Per ISSUES.md item 1:

  • Fix missing SorobanError import that broke treasury test compilation
  • Add test_mock_auths_granular_auth_requirements: uses only mock_auths (no mock_all_auths) to assert exact auth requirements:
    • initialize requires admin auth
    • deposit requires from (user) auth with token transfer sub-invoke
    • withdraw requires admin auth
    • unauthorized withdraw (set_auths(&[])) fails
  • All 11 treasury tests pass
    closes Treasury: mock_auths granular tests #601

Per ISSUES.md item 1:
- Fix missing SorobanError import that broke treasury test compilation
- Add test_mock_auths_granular_auth_requirements: uses only mock_auths
  (no mock_all_auths) to assert exact auth requirements:
    * initialize requires admin auth
    * deposit requires from (user) auth with token transfer sub-invoke
    * withdraw requires admin auth
    * unauthorized withdraw (set_auths(&[])) fails
- All 11 treasury tests pass
@drips-wave

drips-wave Bot commented Apr 23, 2026

Copy link
Copy Markdown

@favourawaku 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

@aji70
aji70 merged commit ee98d72 into MyFanss:main Apr 23, 2026
2 of 9 checks passed
aji70 added a commit that referenced this pull request Apr 30, 2026
…nular-tests

test(treasury): granular mock_auths for initialize/deposit/withdraw auth
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.

Treasury: mock_auths granular tests

2 participants