From 3af3565000e4952d95c50c1c25a9367ba8caec90 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 24 Oct 2016 16:12:44 -0700 Subject: test - fix delegate-call test --- test/unit/idStore-test.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'test/unit') 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') }) }) -- cgit v1.2.3