ShenaniganDApp / shenanigan-monorepo

17 stars 4 forks source link

Testing ChallengeFacet #164

Open youngkidwarrior opened 3 years ago

youngkidwarrior commented 3 years ago

Write tests for Challenge Contract

Challenge Test suite

  1. Create Challenge

    • Call: createChallenge(createChallenge(''ipfs://1", 'ipfs://2', 2, 100))
    • ChallengeFacet should emit ChallengeCreated event when createChallenge Function is called
  2. Challenge must have > 2 options

    • Call: createChallenge(createChallenge('ipfs://1', ''ipfs://2", 1, 100))
    • ChallengeFacet should revert with message "Challenge must have at least two teams"
  3. Challenge must have more than 0 limit

    • Call: createChallenge(createChallenge('ipfs://1', ''ipfs://2", 1, 0))
    • ChallengeFacet should revert with message "Challenge must mint at least one Challenge Token"