Skip to content

Conversation

@Vaibhavsahu2810
Copy link
Contributor

@Vaibhavsahu2810 Vaibhavsahu2810 commented Mar 14, 2025

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:-
Screenshot 2025-03-14 at 2 36 53 PM

@Vaibhavsahu2810
Copy link
Contributor Author

Hello @vatsa287 , can you review this pr?

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.

[C4GT] Network-Score: Add tests for 'UnauthorizedOperation'

1 participant