update chain manager spec

This commit is contained in:
Iuri Matias 2016-02-09 15:08:19 -05:00
parent ef94b9ad96
commit 1b858514e8
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ describe('embark.chain_manager', function() {
chainManager.init('development', blockchainConfig, web3);
it('should initialize chain', function() {
var chain = chainManager.chainManagerConfig['0xb6611efad4ee3eb16e1349241b7015a5ed447e51d251372ef2704f63b5ad5cfc']
var chain = chainManager.chainManagerConfig['0x021a83120c235da14ec41c513dabf7e56e5d8a820177df9da3d1fd2b9c2daf91']
assert.equal(chain != undefined, true);
});
});
@ -31,7 +31,7 @@ describe('embark.chain_manager', function() {
chainManager.addContract("Foo", "123456", [], "0x123");
console.log(chainManager.chainManagerConfig);
var chain = chainManager.chainManagerConfig['0xb6611efad4ee3eb16e1349241b7015a5ed447e51d251372ef2704f63b5ad5cfc']
var chain = chainManager.chainManagerConfig['0x021a83120c235da14ec41c513dabf7e56e5d8a820177df9da3d1fd2b9c2daf91']
var contract = chain.contracts["d5d91a8825c5c253dff531ddda2354c4014f5699b7bcbea70207cfdcb37b6c8b"]
assert.equal(contract.name, "Foo");
@ -58,7 +58,7 @@ describe('embark.chain_manager', function() {
var chainFile = './test/support/chain_manager.json';
var content = fs.readFileSync(chainFile).toString();
assert.equal(content, '{"0xb6611efad4ee3eb16e1349241b7015a5ed447e51d251372ef2704f63b5ad5cfc":{"contracts":{"d5d91a8825c5c253dff531ddda2354c4014f5699b7bcbea70207cfdcb37b6c8b\":{"name":"Foo","address":"0x123"}}}}');
assert.equal(content, '{"0x021a83120c235da14ec41c513dabf7e56e5d8a820177df9da3d1fd2b9c2daf91":{"contracts":{"d5d91a8825c5c253dff531ddda2354c4014f5699b7bcbea70207cfdcb37b6c8b\":{"name":"Foo","address":"0x123"}}}}');
});
});

View File

@ -1 +1 @@
{"0xb6611efad4ee3eb16e1349241b7015a5ed447e51d251372ef2704f63b5ad5cfc":{"contracts":{"d5d91a8825c5c253dff531ddda2354c4014f5699b7bcbea70207cfdcb37b6c8b":{"name":"Foo","address":"0x123"}}}}
{"0x021a83120c235da14ec41c513dabf7e56e5d8a820177df9da3d1fd2b9c2daf91":{"contracts":{"d5d91a8825c5c253dff531ddda2354c4014f5699b7bcbea70207cfdcb37b6c8b":{"name":"Foo","address":"0x123"}}}}