Vault-Hill / VHC1155

0 stars 0 forks source link

unit test smart contract #4

Closed creativogee closed 2 years ago

creativogee commented 2 years ago
  1. Deployment

    • [x] Should revert contract deployment without constructor argument
    • [x] Should successfully deploy contract with constructor argument
  2. .supportsInterface

    • [x] Should support ERC165, ERC2981, ERC1155
    • [x] Should not support ERC721 etc
  3. setURI

    • [x] Should be callable by the contract owner
    • [x] Should not be callable by non-owner
  4. .uri

    • [x] Should return correct uri
    • [x] Should return correct new uri after the change
  5. exists

    • [x] Should return false if token does not exist
  6. totalSupply

    • [x] Should return correct total supply of a token
  7. nextTokenId

    • [x] Should return correct next tokenId
  8. mint

    • [x] Should mint for owner only
    • [x] Should NOT mint for non-owner
    • [x] Should mint a single token
    • [x] Should mint multiple tokens on the same tokenId
    • [x] Should default new mint to next tokenId
    • [x] Should update _tokenOwners IF new mint
    • [x] Should NOT update _tokenOwners IF NOT new mint
    • [x] Should return correct royalty amount
    • [x] Should update royalty amount
    • [x] Should NOT update royalty amount of non-existent token
  9. mintBatch

    • [x] Should batch mint assets
    • [x] Should NOT batch mint assets when arrays length mismatch