diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-01 21:18:13 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-01 21:18:13 +0800 |
commit | d5d20db439a4a6fe913462bd216a776cc4300450 (patch) | |
tree | 727913fb2c38945197c18b901a3e64a6ae4670de /test | |
parent | 07cdfa655be81862f7ff40fe5ac6fdb38d780370 (diff) | |
download | dexon-0x-contracts-d5d20db439a4a6fe913462bd216a776cc4300450.tar.gz dexon-0x-contracts-d5d20db439a4a6fe913462bd216a776cc4300450.tar.zst dexon-0x-contracts-d5d20db439a4a6fe913462bd216a776cc4300450.zip |
Add NOT_A_TAKER check
Diffstat (limited to 'test')
-rw-r--r-- | test/exchange_wrapper_test.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index 4867427ae..c5cbc58be 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -129,13 +129,22 @@ describe('ExchangeWrapper', () => { describe('failed fills', () => { it('should throw when the fill amount is zero', async () => { const maker = userAddresses[0]; - const taker = userAddresses[1]; + const taker = userAddresses[0]; const signedOrder = await orderFactory.createSignedOrderAsync(zeroEx, networkId, maker, taker, 5, addressBySymbol.MLN, 5, addressBySymbol.GNT); const fillAmount = new BigNumber(0); expect(zeroEx.exchange.fillOrderAsync(signedOrder, fillAmount)) .to.be.rejectedWith(FillOrderValidationErrs.FILL_AMOUNT_IS_ZERO); }); + it('should throw when sender is not a taker', async () => { + const maker = userAddresses[0]; + const taker = userAddresses[1]; + const signedOrder = await orderFactory.createSignedOrderAsync(zeroEx, networkId, maker, taker, + 5, addressBySymbol.MLN, 5, addressBySymbol.GNT); + const fillAmount = new BigNumber(5); + expect(zeroEx.exchange.fillOrderAsync(signedOrder, fillAmount)) + .to.be.rejectedWith(FillOrderValidationErrs.NOT_A_TAKER); + }); }); describe('successful fills', () => { afterEach('reset default account', () => { |