Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Commit

Permalink
Added mint exchange tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
MoMannn committed Mar 5, 2018
1 parent 4da05f1 commit 3263e81
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/exchange/MintableExchange.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,18 @@ contract('MintableExchange', (accounts) => {
assert.notEqual(event, undefined);
});

it('throws when fee amount array is no the same length then feeRecipient', async () => {
await token.approve(tokenProxy.address, 20, {from: to});
await xcert.setMintAuthorizedAddress(mintProxy.address, true, {from: owner});
await assertRevert(exchange.performMint(to, xcert.address, id1, uri, addressArray, [20,10], timestamp, v, r, s, true, {from: to}));
});

it('throws when _from is the owner addresses are the same', async () => {
await token.approve(tokenProxy.address, 20, {from: to});
await xcert.setMintAuthorizedAddress(mintProxy.address, true, {from: owner});
await assertRevert(exchange.performMint(owner, xcert.address, id1, uri, addressArray, amountArray, timestamp, v, r, s, true, {from: to}));
});

it('fails when trying to perform already performed mint', async () => {
await token.approve(tokenProxy.address, 20, {from: to});
await xcert.setMintAuthorizedAddress(mintProxy.address, true, {from: owner});
Expand Down

0 comments on commit 3263e81

Please sign in to comment.