Skip to content
Permalink
Browse files

fix(test): err msg

  • Loading branch information...
n1c01a5 authored and satello committed May 9, 2018
1 parent baf5e24 commit f2e838d1fb3f6ca4469135a2a684b5dfe320a118
Showing with 7 additions and 7 deletions.
  1. +7 −7 tests/integration/contracts.test.js
@@ -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
}
@@ -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,
@@ -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,

0 comments on commit f2e838d

Please sign in to comment.
You can’t perform that action at this time.