Skip to content

network-score: Add tests for UnauthorizedOperation - #596

Open
Vaibhavsahu2810 wants to merge 1 commit into
dhiway:develop_20250418from
Vaibhavsahu2810:issue294_add_test_UnauthorizedOperations
Open

network-score: Add tests for UnauthorizedOperation#596
Vaibhavsahu2810 wants to merge 1 commit into
dhiway:develop_20250418from
Vaibhavsahu2810:issue294_add_test_UnauthorizedOperations

Conversation

@Vaibhavsahu2810

@Vaibhavsahu2810 Vaibhavsahu2810 commented Mar 14, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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