Skip to content

[Testing] RemittanceNFT update_metadata_uri is entirely untested #1149

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

remittance_nft/src/lib.rs:605-628 update_metadata_uri performs auth, URI validation, legacy-score migration (get_or_migrate_metadata), persistence, and a UriUpd event emit, but no test in remittance_nft/src/test.rs invokes it. The success path, the NftNotFound path (no NFT), unauthorized-minter rejection, and the legacy-migration path are all uncovered.

Acceptance criteria

  • Test update_metadata_uri updates the URI and get_metadata_uri reflects it
  • Test it returns NftNotFound for a user with no NFT and rejects an unauthorized minter
  • Test it migrates a legacy Score-only user before updating, and emits the UriUpd event

Files to touch

  • contracts/remittance_nft/src/test.rs

Out of scope

  • Changing update_metadata_uri behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    contractsIssues related to smart contractsnftNFT functionalitytestingAdding or fixing tests

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions