test: add emergency pause/unpause scenario tests (#878)#922
Merged
Xoulomon merged 2 commits intoMay 30, 2026
Conversation
- test_contribute_fails_when_group_paused: verifies contribute() returns InvalidState (1003) when group is paused - test_execute_payout_fails_when_group_paused: verifies execute_payout() returns InvalidState (1003) when group is paused - test_operations_resume_after_unpause: verifies status returns to Active and paused flag is cleared after unpause_group() - test_pause_group_non_creator_rejected: non-creator cannot pause - test_unpause_group_non_creator_rejected: non-creator cannot unpause - setup_active_group helper for shared test setup
|
@euniceamoni 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! 🚀 |
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
Adds dedicated test cases for the emergency pause/unpause contract functions as specified in issue #878.
Tests added
test_contribute_fails_when_group_pausedcontribute()returnsInvalidState(1003) when group is pausedtest_execute_payout_fails_when_group_pausedexecute_payout()returnsInvalidState(1003) when group is pausedtest_operations_resume_after_unpauseActiveandpausedflag is cleared afterunpause_group()test_pause_group_non_creator_rejectedtest_unpause_group_non_creator_rejectedA
setup_active_grouphelper is included to reduce boilerplate across the new tests.Files changed
contracts/stellar-save/src/lib.rs— 158 lines added (tests only, no logic changes)Closes #878