aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-10-25 07:12:44 +0800
committerkumavis <aaron@kumavis.me>2016-10-25 07:12:44 +0800
commit3af3565000e4952d95c50c1c25a9367ba8caec90 (patch)
tree6fd725ffd0ea856c4205472557e33aa012b3b16e /test/unit
parent85d03cc8fbc6626a6617d46f3ecd5ec1e2e5f4fa (diff)
downloadtangerine-wallet-browser-3af3565000e4952d95c50c1c25a9367ba8caec90.tar
tangerine-wallet-browser-3af3565000e4952d95c50c1c25a9367ba8caec90.tar.gz
tangerine-wallet-browser-3af3565000e4952d95c50c1c25a9367ba8caec90.tar.bz2
tangerine-wallet-browser-3af3565000e4952d95c50c1c25a9367ba8caec90.tar.lz
tangerine-wallet-browser-3af3565000e4952d95c50c1c25a9367ba8caec90.tar.xz
tangerine-wallet-browser-3af3565000e4952d95c50c1c25a9367ba8caec90.tar.zst
tangerine-wallet-browser-3af3565000e4952d95c50c1c25a9367ba8caec90.zip
test - fix delegate-call test
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/idStore-test.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js
index c3f79b088..da465f511 100644
--- a/test/unit/idStore-test.js
+++ b/test/unit/idStore-test.js
@@ -1,14 +1,10 @@
+const async = require('async')
const assert = require('assert')
-const IdentityStore = require('../../app/scripts/lib/idStore')
-const configManagerGen = require('../lib/mock-config-manager')
-const fs = require('fs')
-const path = require('path')
const ethUtil = require('ethereumjs-util')
const BN = ethUtil.BN
-const async = require('async')
-
-const nonDelegatePath = path.join(__dirname, '..', 'lib', 'non-delegate-code.txt')
-const nonDelegateCode = fs.readFileSync(nonDelegatePath).toString()
+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() {
@@ -170,7 +166,7 @@ describe('IdentityStore', function() {
},
})
- var result = idStore.checkForDelegateCall(nonDelegateCode)
- assert.equal(result, false, 'no delegate call in provided code')
+ var result = idStore.checkForDelegateCall(delegateCallCode)
+ assert.equal(result, true, 'no delegate call in provided code')
})
})