2018-05-30 21:35:54 +00:00
|
|
|
/*global contract, config, it, embark*/
|
|
|
|
const assert = require('assert');
|
|
|
|
const AnotherStorage = embark.require('Embark/contracts/AnotherStorage');
|
|
|
|
const SimpleStorage = embark.require('Embark/contracts/SimpleStorage');
|
|
|
|
|
|
|
|
config({
|
|
|
|
contracts: {
|
|
|
|
"SimpleStorage": {
|
|
|
|
args: [100]
|
|
|
|
},
|
|
|
|
"AnotherStorage": {
|
|
|
|
args: ["$SimpleStorage"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-07-03 22:15:43 +00:00
|
|
|
contract("AnotherStorage", function() {
|
2018-01-05 20:10:47 +00:00
|
|
|
this.timeout(0);
|
2017-02-10 00:38:02 +00:00
|
|
|
|
2018-04-17 18:48:31 +00:00
|
|
|
it("set SimpleStorage address", async function() {
|
|
|
|
let result = await AnotherStorage.methods.simpleStorageAddress().call();
|
|
|
|
assert.equal(result.toString(), SimpleStorage.options.address);
|
2017-02-10 00:38:02 +00:00
|
|
|
});
|
|
|
|
});
|