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
Expand Up @@ -29,7 +29,7 @@ describe('Contracts', () => {
other = web3.eth.accounts[2] other = web3.eth.accounts[2]


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

0 comments on commit f2e838d

Please sign in to comment.