Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
fix(test): err msg
Browse files Browse the repository at this point in the history
  • Loading branch information
n1c01a5 authored and satello committed May 9, 2018
1 parent baf5e24 commit f2e838d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/integration/contracts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Contracts', () => {
other = web3.eth.accounts[2]

klerosPOCData = {
timesPerPeriod: [1, 1, 1, 1, 1],
timesPerPeriod: [1, 1, 1, 1, 1], // activation, draw, vote, appeal, execution (seconds)
account: other,
value: 0
}
Expand All @@ -47,8 +47,8 @@ describe('Contracts', () => {
describe('KlerosPOC', async () => {
it('deploys arbitrator with contractInstance', async () => {
const newKlerosPOC = await KlerosPOC.deploy(
'',
'',
'', // rngAddress param
'', // pnkAddress param
klerosPOCData.timesPerPeriod,
klerosPOCData.account,
klerosPOCData.value,
Expand All @@ -65,18 +65,18 @@ describe('Contracts', () => {
expect(contractInstance.address).toEqual(newKlerosPOC.address)
})
it('initializing contract with bad address fails', async () => {
const newKlerosPOC = new KlerosPOC(provider, '0xfakeaddress')
const newKlerosPOC = new KlerosPOC(provider, 0x0) // bad address param
try {
// Check that we can bootstrap with address
await newKlerosPOC.loadContract()
} catch (err) {
expect(err.message).toEqual(errorConstants.UNABLE_TO_LOAD_CONTRACT)
expect(err.message).toEqual(errorConstants.CONTRACT_INSTANCE_NOT_SET)
}
})
it('setContractInstance throws with undefined parameters', async () => {
const newKlerosPOC = await KlerosPOC.deploy(
'',
'',
'', // rngAddress param
'', // pnkAddress param
klerosPOCData.timesPerPeriod,
klerosPOCData.account,
klerosPOCData.value,
Expand Down

0 comments on commit f2e838d

Please sign in to comment.