GoodDollar/GoodContracts

Token model should have e2e tests

Closed this issue · 1 comments

sirpy commented

Now that contracts are deployed via migration script on "test" network we can write tests that check the deployed contracts

  • for each contract create an e2e.test.js file
  • for each contract adapt some tests from unit tests
  • concentrate on tests that check the main use cases and flow, keep it simple, 1-2 expects in each test, 1-3 tests for each. use case
    • user stake
    • user withdraw stake
    • interest collected
    • ubi minted
    • ubi+interest transfered to fundmanager
    • interest transfered to staking model (need to change the avgdonationratio to test this)
    • ubi bridged to ubischeme (bridges already mocked with BridgeMock)
    • ubi claimed
    • user fished
    • ubi re-calculated daily
    • start/end (ie addRights)
    • onlyAvatar Reserve
    • buy
    • sell
    • anything else i've missed
sirpy commented

@ordd see issue regarding getting to 100% coverage.
use this opportunity to make tests here that will complete our coverage to 100%