diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-07-04 05:31:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-04 05:31:40 +0800 |
commit | 86c742cb11d0bb6a5ffb14275ce86be265b04cb8 (patch) | |
tree | cde0f449e90d108a3d715faf12d859487c236b6a /test/proxy_wrapper_test.ts | |
parent | 92c6144b6a7a47402770cd6c1d33db7f4cb847ec (diff) | |
parent | d4cef89587ef8ea0f7fbab1146c4524e8f588eac (diff) | |
download | dexon-sol-tools-86c742cb11d0bb6a5ffb14275ce86be265b04cb8.tar dexon-sol-tools-86c742cb11d0bb6a5ffb14275ce86be265b04cb8.tar.gz dexon-sol-tools-86c742cb11d0bb6a5ffb14275ce86be265b04cb8.tar.bz2 dexon-sol-tools-86c742cb11d0bb6a5ffb14275ce86be265b04cb8.tar.lz dexon-sol-tools-86c742cb11d0bb6a5ffb14275ce86be265b04cb8.tar.xz dexon-sol-tools-86c742cb11d0bb6a5ffb14275ce86be265b04cb8.tar.zst dexon-sol-tools-86c742cb11d0bb6a5ffb14275ce86be265b04cb8.zip |
Merge branch 'master' into wrap-log-bignumber
Diffstat (limited to 'test/proxy_wrapper_test.ts')
-rw-r--r-- | test/proxy_wrapper_test.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/proxy_wrapper_test.ts b/test/proxy_wrapper_test.ts new file mode 100644 index 000000000..29b5776c6 --- /dev/null +++ b/test/proxy_wrapper_test.ts @@ -0,0 +1,23 @@ +import * as chai from 'chai'; +import {chaiSetup} from './utils/chai_setup'; +import {web3Factory} from './utils/web3_factory'; +import {ZeroEx} from '../src'; +import {ProxyWrapper} from '../src/contract_wrappers/proxy_wrapper'; + +chaiSetup.configure(); +const expect = chai.expect; + +describe('ProxyWrapper', () => { + let zeroEx: ZeroEx; + before(async () => { + const web3 = web3Factory.create(); + zeroEx = new ZeroEx(web3.currentProvider); + }); + describe('#isAuthorizedAsync', () => { + it('should return false if the address is not authorized', async () => { + const proxyWrapper = (zeroEx as any)._proxyWrapper as ProxyWrapper; + const isAuthorized = await proxyWrapper.isAuthorizedAsync(ZeroEx.NULL_ADDRESS); + expect(isAuthorized).to.be.false(); + }); + }); +}); |