Skip to content

Commit

Permalink
add test to ensure subsequent calls to collateralize throw
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnial committed Feb 26, 2018
1 parent 500fcde commit b4c98a8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/ts/unit/collateralized_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ contract("CollateralizedContract (Unit Tests)", async (ACCOUNTS) => {
expect(logReturned).to.deep.equal(logExpected);
});

it("should throw on subsequent calls to `collateralize`", async () => {
await expect(collateralContract.collateralize.sendTransactionAsync(
AGREEMENT_ID,
mockToken.address,
new BigNumber(1),
new BigNumber(moment().add(2, 'years').unix()),
{ from: COLLATERALIZER }
)).to.eventually.be.rejectedWith(REVERT_ERROR);
});

});

});
Expand Down

0 comments on commit b4c98a8

Please sign in to comment.