-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pallet-asset: Added new test-case for DistributionLimitExceeded. (#522)
This issue has been structured similarly to the `asset_create_should_succeed` test. This test will ensure that an asset can be issued successfully and will include coverage for reaching and exceeding the `MaxAssetDistribution` limit. - Test Initialization: The test sets up a space, approves it, and creates an asset similarly to the `asset_create_should_succeed` test. - Asset Issuance: The loop issues the asset up to the `MaxAssetDistribution` limit (set to 25 for testing). Each iteration simulates issuing the asset to a different recipient. - Error Handling: After the limit is reached, the test tries to issue the asset to one more recipient, which should trigger the `DistributionLimitExceeded` error. This ensures that the pallet's logic correctly handles and enforces the distribution limit. This implementation checks that the asset issuance process is valid up to the `MaxAssetDistribution` limit and correctly throws an error when the `limit` is exceeded.
- Loading branch information
1 parent
8351245
commit accb726
Showing
2 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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