cord
cord copied to clipboard
network-score: Add tests for UnauthorizedOperation
Fixes #294
Description
This PR adds a test case to verify that rating revocations are properly authorized. The test ensures that a rating can only be revoked using the authorization ID that was used to create it, preventing unauthorized operations.
Implementation
- Creates two spaces with different authorization IDs
- Registers a rating using the first authorization ID
- Attempts to revoke the rating using the second authorization ID
- Verifies that the operation fails with an UnauthorizedOperation error
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:-
Hello @vatsa287 , can you review this pr?