aboutsummaryrefslogtreecommitdiffstats
path: root/test/exchange_wrapper_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 23:26:16 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-06 23:26:16 +0800
commit42b4952693b66d722fa541af4a2ae9034c1cd3e7 (patch)
tree7e77075ecf8272ec61d1a650746a5442318a2c2c /test/exchange_wrapper_test.ts
parentfa910bca0ebcc71e5fd7aa656972d77bec08c9e5 (diff)
downloaddexon-sol-tools-42b4952693b66d722fa541af4a2ae9034c1cd3e7.tar
dexon-sol-tools-42b4952693b66d722fa541af4a2ae9034c1cd3e7.tar.gz
dexon-sol-tools-42b4952693b66d722fa541af4a2ae9034c1cd3e7.tar.bz2
dexon-sol-tools-42b4952693b66d722fa541af4a2ae9034c1cd3e7.tar.lz
dexon-sol-tools-42b4952693b66d722fa541af4a2ae9034c1cd3e7.tar.xz
dexon-sol-tools-42b4952693b66d722fa541af4a2ae9034c1cd3e7.tar.zst
dexon-sol-tools-42b4952693b66d722fa541af4a2ae9034c1cd3e7.zip
Add test when the order was already cancelled or filled
Diffstat (limited to 'test/exchange_wrapper_test.ts')
-rw-r--r--test/exchange_wrapper_test.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index b9400bf04..90ebe5b38 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -358,6 +358,11 @@ describe('ExchangeWrapper', () => {
return expect(zeroEx.exchange.cancelOrderAsync(expiredSignedOrder, cancelAmount))
.to.be.rejectedWith(ExchangeContractErrs.ORDER_CANCEL_EXPIRED);
});
+ it.only('should throw when order is already cancelled or filled', async () => {
+ await zeroEx.exchange.cancelOrderAsync(signedOrder, fillableAmount);
+ return expect(zeroEx.exchange.cancelOrderAsync(signedOrder, fillableAmount))
+ .to.be.rejectedWith(ExchangeContractErrs.ORDER_ALREADY_CANCELLED_OR_FILLED);
+ });
});
describe('successful cancels', () => {
it('should cancel an order', async () => {