Skip to content

Commit

Permalink
Update tests to ensure sum-tree is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
robsecord committed Aug 12, 2020
1 parent 2cada74 commit 0c15f89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/PrizeStrategy.test.js
Expand Up @@ -406,6 +406,9 @@ describe('PrizeStrategy', function() {
// have the mock update the number of prize tickets
await prizePool.call(prizeStrategy, 'afterDepositTo', wallet._address, toWei('10'), ticket.address, []);

// confirm odds of winning
expect(await prizeStrategy.chanceOf(wallet._address)).to.equal(toWei('10'))

// ensure prize period is over
await prizeStrategy.setCurrentTime(await prizeStrategy.prizePeriodEndAt());

Expand Down Expand Up @@ -445,6 +448,8 @@ describe('PrizeStrategy', function() {

expect(await call(prizeStrategy, 'balanceOfCredit', wallet._address)).to.equal(toWei('1.1'))

// confirm increased odds of winning
expect(await prizeStrategy.chanceOf(wallet._address)).to.equal(toWei('11'))
})
})

Expand Down

0 comments on commit 0c15f89

Please sign in to comment.