Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pallet-asset: Added new test cases for invalid asset value Fixes #372 #561

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ritankarsaha
Copy link
Contributor

This PR fixes the issue #372

Implementation Approach

  1. Analyzed existing test cases (particularly asset_create_should_succeed) as referenced in the issue
  2. Identified all functions that could return InvalidAssetValue error
  3. Wrote test cases for efficiency while maintaining comprehensive coverage
  4. Implemented test validating:
    • Regular asset creation with invalid value
    • VC asset creation with invalid quantity

Testing

  • All new tests can be executed using cargo test -p pallet-asset
  • Test cases validate proper error handling

Below is the attached screenshot of the test case passing in the local environment:-

Screenshot 2025-01-06 at 1 05 26 PM

@ritankarsaha
Copy link
Contributor Author

ritankarsaha commented Jan 13, 2025

@vatsa287 is this implementation correct or does this PR require any more changes??

@vatsa287
Copy link
Member

@ritankarsaha Please go through the review comments on this PR #520. Make similar changes here.

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.

2 participants