All four issues resolved#459
Open
ZainabJanee wants to merge 1 commit into
Open
Conversation
- Test description at exactly 1024 chars passes - Test description of 1025 chars returns InvalidDescription - Test empty description returns InvalidDescription - Test single-char description passes The validation (description.len() in 1..=1024) already exists in create_proposal and amend_proposal; this commit adds explicit test coverage for the boundary cases. Closes PrincessnJoy#309
|
@ZainabJanee 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 #309
Closes #308
Closes #304
Closes #321
The
create_proposalandamend_proposalfunctions already enforce1 ≤ description.len() ≤ 1024viaInvalidDescription, but there was no test coverage for these boundary conditions.Changes
contracts/governance/src/test.rs:test_create_proposal_description_at_max_length_succeeds— 1024 chars passes ✓test_create_proposal_description_over_max_length_fails— 1025 chars →InvalidDescription✓test_create_proposal_empty_description_fails— empty string →InvalidDescription✓test_create_proposal_description_one_char_succeeds— minimum valid input passes ✓Acceptance Criteria