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

Fixes: #318 Add test cases for PresentationDigestAlreadyAnchored error #542

Conversation

Vaibhavsahu2810
Copy link
Contributor

@Vaibhavsahu2810 Vaibhavsahu2810 commented Dec 21, 2024

Fix for- #318 .

This PR adds a new unit test to the pallet-statement module to verify that attempting to add a presentation with the same digest to a statement that already has a presentation with that digest results in the expected error:
Error::< Test >::PresentationDigestAlreadyAnchored.

The test covers the following scenarios:

Creates a statement.
Adds a presentation to the statement.
Attempts to add the same presentation (with the same digest) to the same statement again.
Asserts that the second add_presentation call fails with the expected error.
This test enhances the test coverage of the pallet-statement module and improves its overall quality.

Copy link
Member

@vatsa287 vatsa287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vatsa287 vatsa287 requested a review from amarts December 23, 2024 06:29
@amarts amarts merged commit 6fa1f04 into dhiway:develop Jan 2, 2025
3 checks passed
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.

3 participants