diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-30 04:41:35 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-30 04:41:35 +0800 |
commit | 6aa37ad3e489f717ddba84118d1e6805816840d6 (patch) | |
tree | 29d54e14166a5a711102eaf23070d0664f22cd7a /test | |
parent | 1321ea5beb530ca301ff4c7408ada66c44759b12 (diff) | |
download | dexon-0x-contracts-6aa37ad3e489f717ddba84118d1e6805816840d6.tar.gz dexon-0x-contracts-6aa37ad3e489f717ddba84118d1e6805816840d6.tar.zst dexon-0x-contracts-6aa37ad3e489f717ddba84118d1e6805816840d6.zip |
Add tests for getProxyAuthorizedContractAddressesAsync
Diffstat (limited to 'test')
-rw-r--r-- | test/exchange_wrapper_test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index cf828bd8d..dc68e44bd 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -23,6 +23,7 @@ import {DoneCallback} from '../src/types'; import {FillScenarios} from './utils/fill_scenarios'; import {TokenUtils} from './utils/token_utils'; import {assert} from '../src/utils/assert'; +import {ProxyWrapper} from '../src/contract_wrappers/proxy_wrapper'; chaiSetup.configure(); const expect = chai.expect; @@ -819,4 +820,15 @@ describe('ExchangeWrapper', () => { }); }); }); + describe('#getProxyAuthorizedContractAddressesAsync', () => { + it('returns the Proxy authorized exchange contract addresses', async () => { + const exchangeAddresses = await zeroEx.exchange.getProxyAuthorizedContractAddressesAsync(); + for (const exchangeAddress of exchangeAddresses) { + assert.isETHAddressHex('exchangeAddress', exchangeAddress); + const proxyWrapper = (zeroEx as any)._proxyWrapper as ProxyWrapper; + const isAuthorized = await proxyWrapper.isAuthorizedAsync(exchangeAddress); + expect(isAuthorized).to.be.true(); + } + }); + }); }); |