diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2017-12-07 12:46:53 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2017-12-13 07:02:05 +0800 |
commit | 548fda8dbaadc4827137d4b90753b306fdfd554b (patch) | |
tree | 7a2dc681b61394a5c6bf0731272acc2109ad7b51 /packages/contracts/test | |
parent | b58bf8259db7378b841e6695d99580027b4e2969 (diff) | |
download | dexon-sol-tools-548fda8dbaadc4827137d4b90753b306fdfd554b.tar dexon-sol-tools-548fda8dbaadc4827137d4b90753b306fdfd554b.tar.gz dexon-sol-tools-548fda8dbaadc4827137d4b90753b306fdfd554b.tar.bz2 dexon-sol-tools-548fda8dbaadc4827137d4b90753b306fdfd554b.tar.lz dexon-sol-tools-548fda8dbaadc4827137d4b90753b306fdfd554b.tar.xz dexon-sol-tools-548fda8dbaadc4827137d4b90753b306fdfd554b.tar.zst dexon-sol-tools-548fda8dbaadc4827137d4b90753b306fdfd554b.zip |
Add updated contracts, reorganize contract file structure
Diffstat (limited to 'packages/contracts/test')
-rw-r--r-- | packages/contracts/test/ts/erc20Token.ts | 6 | ||||
-rw-r--r-- | packages/contracts/test/ts/exchange/core.ts | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/contracts/test/ts/erc20Token.ts b/packages/contracts/test/ts/erc20Token.ts index e2282cbf3..9aa93180b 100644 --- a/packages/contracts/test/ts/erc20Token.ts +++ b/packages/contracts/test/ts/erc20Token.ts @@ -9,7 +9,7 @@ import {ContractInstance} from '../../util/types'; import {chaiSetup} from './utils/chai_setup'; -const {DummyToken} = new Artifacts(artifacts); +const {DummyTokenV2} = new Artifacts(artifacts); const web3: Web3 = (global as any).web3; chaiSetup.configure(); const expect = chai.expect; @@ -24,7 +24,7 @@ contract('ERC20Token', (accounts: string[]) => { let token: ContractInstance; beforeEach(async () => { - token = await DummyToken.new({from: owner}); + token = await DummyTokenV2.new({from: owner}); await token.mint(MAX_MINT_VALUE, {from: owner}); tokenAddress = token.address; }); @@ -33,7 +33,7 @@ contract('ERC20Token', (accounts: string[]) => { it('should throw if owner has insufficient balance', async () => { const ownerBalance = await zeroEx.token.getBalanceAsync(tokenAddress, owner); const amountToTransfer = ownerBalance.plus(1); - return expect(token.transfer.call(owner, spender, amountToTransfer, {from: spender})) + return expect(token.transfer.call(spender, amountToTransfer, {from: owner})) .to.be.rejectedWith(constants.REVERT); }); diff --git a/packages/contracts/test/ts/exchange/core.ts b/packages/contracts/test/ts/exchange/core.ts index e4aa74c32..7f632c6e6 100644 --- a/packages/contracts/test/ts/exchange/core.ts +++ b/packages/contracts/test/ts/exchange/core.ts @@ -610,7 +610,7 @@ contract('Exchange', (accounts: string[]) => { }); return expect(exWrapper.fillOrderAsync(order, taker, {shouldThrowOnInsufficientBalanceOrAllowance: false})) - .to.be.rejectedWith(constants.INVALID_OPCODE); + .to.be.rejectedWith(constants.REVERT); }); it('should not change balances if an order is expired', async () => { |