Skip to content

Contract Test case Definition #7

Description

@mehdi-torabiv

Test cases

Below are the test cases for the engagement contract.

variables

uint private _counter; // increment on issue function
mapping(uint id, uint) private _tokenCount; // nb of accounts that have minted a token

deployment

Success

issue(string memory tokenCid)

Creates a new token and adds a cid to it's metadata.

Success

mint(uint id, string memory account)

Mint a token balance to 1.

Success

Revert

burn(uint id, string memory account)

Burn the token balance to 0.

Success

Revert

getScore(uint date, uint id, string memory account)

Return a formatted uri: ipfs://hash/id/account.json

Success

Revert

updateScores(uint date, string memory cid)

Update the cid for a given date.

Success

Revert

uri(uint id)

Return a formatted uri: ipfs://hash.json

Success

Revert

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions