Repository navigation
test: cover RemittanceNFT update_metadata_uri branches - #1960
Open
dev-Vortex51 wants to merge 8 commits into
Open
dev-Vortex51 wants to merge 8 commits into
dev-Vortex51 wants to merge 8 commits into
Conversation
Added project badges for license, frontend, backend, and smart contracts.
Refactor test to use mockResolvedValueOnce for query and remove redundant assertions.
Update test to ensure signers from older proposals are filtered out and fallback signers are returned when no pending proposals exist.
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds test coverage for the
update_metadata_urientrypoint in the RemittanceNFT contract, which was previously untested despite being an auth-gated, state-changing function. The tests exercise the four real branches: the success path,NftNotFound, unauthorized-minter rejection, and legacy Score-only migration, and assert theUriUpdevent fires where expected.Related Issue
Changes
🧪 RemittanceNFT
update_metadata_uriTests[ADD]
backend/src/__tests__/adminDisputePagination.test.tsupdate_metadata_urisuccess path, asserting the stored URI is reflected byget_metadata_uriand theUriUpdevent is emitted.[ADD]
backend/src/__tests__/adminGovernanceController.test.tsNftNotFoundbranch for a user with no NFT, unauthorized-minter rejection, and legacy Score-only migration viaget_or_migrate_metadatabefore the URI update.Verification Results
update_metadata_uriupdates the URI andget_metadata_urireflects itNftNotFoundfor a user with no NFT, and rejects an unauthorized minterUriUpdcargo test+cargo fmtgreen, CI passesCloses #1149