aboutsummaryrefslogtreecommitdiffstats
path: root/test/proxy_wrapper_test.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-07-04 03:28:34 +0800
committerGitHub <noreply@github.com>2017-07-04 03:28:34 +0800
commitd4cef89587ef8ea0f7fbab1146c4524e8f588eac (patch)
tree93dcf602b5a738bad03c121384707fcf19518310 /test/proxy_wrapper_test.ts
parentd506a1f98562dd11ecff5e936a93fce6d14e48a9 (diff)
parent8204409c6d6bf773aa8ebb38006a3975ed43a684 (diff)
downloaddexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar
dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.gz
dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.bz2
dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.lz
dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.xz
dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.tar.zst
dexon-sol-tools-d4cef89587ef8ea0f7fbab1146c4524e8f588eac.zip
Merge pull request #82 from 0xProject/add-exchange-address-to-order-struct
Allow multiple Exchange contracts and multiple artifacts
Diffstat (limited to 'test/proxy_wrapper_test.ts')
-rw-r--r--test/proxy_wrapper_test.ts23
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();
+ });
+ });
+});