Skip to content

Commit

Permalink
Increase finance test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
izqui committed Oct 29, 2017
1 parent 9032bfb commit 846cab3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/finance/test/finance.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ contract('Finance App', accounts => {
assert.equal(await token2.balanceOf(recipient), 190, 'recipient should have received tokens')
})

it('can change period duration', async () => {
await app.setPeriodDuration(50)
await app.mock_setTimestamp(160) // previous period time was 100, so in 160 must have transitioned 2

await app.tryTransitionAccountingPeriod()

assert.equal(await app.currentPeriodId(), 2, 'shpuld have transitioned 2 periods')
})

context('setting budget', () => {
const recipient = accounts[1]
const time = 22
Expand Down

0 comments on commit 846cab3

Please sign in to comment.