test(stream): add open-ended stream + clawback regression tests (#458) - #495
Open
Abba073 wants to merge 1 commit into
Open
test(stream): add open-ended stream + clawback regression tests (#458)#495Abba073 wants to merge 1 commit into
Abba073 wants to merge 1 commit into
Conversation
…uit-protocol#458) Two regression tests covering the interaction between end_time == 0 and clawback, which had no test coverage: - clawback_open_ended_refunds_unstreamed_remainder: verifies that clawback refunds exactly (deposit - accrued) and leaves the accrued balance in the contract for the recipient. - clawback_open_ended_does_not_touch_accrued_funds: verifies that after clawback the recipient can still withdraw every stroop that accrued before the clawback, but not a single stroop more.
|
@Abba073 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
Closes #458.
Adds two regression tests covering the
end_time == 0(open-ended) + clawback interaction, which had no test coverage.Tests added
Both tests use a manual inline setup (same pattern as
initialize_accepts_open_ended_stream) since theSetuphelper always sets a boundedend_time.clawback_open_ended_refunds_unstreamed_remainderend_time = 0deposit − accrued = 7,000clawback_open_ended_does_not_touch_accrued_fundswithdrawable() == 5,000withdrawable() == 0afterwardsWhat was not changed
No production code was modified. This is a test-only change.