Re-run validation and add admin-only limit change tests - #185
Open
funds0033-cmyk wants to merge 2 commits into
Open
Re-run validation and add admin-only limit change tests#185funds0033-cmyk wants to merge 2 commits into
funds0033-cmyk wants to merge 2 commits into
Conversation
Closes RemitFlow#95 Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
test_set_limits_requires_admin_authto verify unauthorized calls fail and existing limits remain unchanged.test_set_limits_by_admin_succeedsto confirm authenticated administrators can successfully update contract limits.test_admin_operations_require_initializationto verifyset_limitsreturnsNotInitializedbefore contract initialization.docs/unit-tests.mdwith the new authorization test coverage.docs/testing-guide.mdto document the new admin authorization test scenarios.Validation
set_limitscalls are rejected without modifying stored limits.set_limitsreturnsNotInitializedwhen invoked before contract initialization.Closes #95