diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-10-26 07:59:58 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-10-26 07:59:58 +0800 |
commit | f9ff6cb55e35f29e95cab3b2157b58e602e6a35c (patch) | |
tree | b722dadc330744a8037be1afe9ffd7a4c51c5baf /test/unit | |
parent | 152419a79bd26d9b6f5af43c2066eb1e6f619716 (diff) | |
parent | f7688ac3cf8939057013667f544d57dcb73937a5 (diff) | |
download | tangerine-wallet-browser-f9ff6cb55e35f29e95cab3b2157b58e602e6a35c.tar.gz tangerine-wallet-browser-f9ff6cb55e35f29e95cab3b2157b58e602e6a35c.tar.zst tangerine-wallet-browser-f9ff6cb55e35f29e95cab3b2157b58e602e6a35c.zip |
Merge branch 'master' into i328-MultiVault
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/idStore-test.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js index 0a57d2121..da465f511 100644 --- a/test/unit/idStore-test.js +++ b/test/unit/idStore-test.js @@ -1,9 +1,10 @@ -var assert = require('assert') -var IdentityStore = require('../../app/scripts/lib/idStore') -var configManagerGen = require('../lib/mock-config-manager') +const async = require('async') +const assert = require('assert') const ethUtil = require('ethereumjs-util') const BN = ethUtil.BN -const async = require('async') +const configManagerGen = require('../lib/mock-config-manager') +const delegateCallCode = require('../lib/example-code.json').delegateCallCode +const IdentityStore = require('../../app/scripts/lib/idStore') describe('IdentityStore', function() { @@ -156,4 +157,16 @@ describe('IdentityStore', function() { assert.ok(bnResult.gt(gas), 'added more gas as buffer.') assert.equal(result.indexOf('0x'), 0, 'include hex prefix') }) + + describe('#checkForDelegateCall', function() { + const idStore = new IdentityStore({ + configManager: configManagerGen(), + ethStore: { + addAccount(acct) { accounts.push(ethUtil.addHexPrefix(acct)) }, + }, + }) + + var result = idStore.checkForDelegateCall(delegateCallCode) + assert.equal(result, true, 'no delegate call in provided code') + }) }) |