Skip to content

Re-run validation and add admin-only limit change tests - #185

Open
funds0033-cmyk wants to merge 2 commits into
RemitFlow:mainfrom
funds0033-cmyk:test/limit-change-auth-95
Open

Re-run validation and add admin-only limit change tests#185
funds0033-cmyk wants to merge 2 commits into
RemitFlow:mainfrom
funds0033-cmyk:test/limit-change-auth-95

Conversation

@funds0033-cmyk

Copy link
Copy Markdown
Contributor

Summary

This PR adds test coverage for the admin authorization requirements around set_limits, ensuring only authenticated administrators can modify contract limits and validating behavior before contract initialization.

Changes

  • Added test_set_limits_requires_admin_auth to verify unauthorized calls fail and existing limits remain unchanged.
  • Added test_set_limits_by_admin_succeeds to confirm authenticated administrators can successfully update contract limits.
  • Extended test_admin_operations_require_initialization to verify set_limits returns NotInitialized before contract initialization.
  • Updated docs/unit-tests.md with the new authorization test coverage.
  • Updated docs/testing-guide.md to document the new admin authorization test scenarios.

Validation

  • Verified unauthorized set_limits calls are rejected without modifying stored limits.
  • Confirmed authenticated administrators can successfully update limits.
  • Confirmed set_limits returns NotInitialized when invoked before contract initialization.
  • Verified documentation reflects the new test coverage.

Closes #95

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 tests covering limit-change authorization

1 participant