embark-area-51/test_apps/test_app/test/another_storage_spec.js

25 lines
631 B
JavaScript
Raw Normal View History

2018-06-01 10:48:29 -04: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 18:15:43 -04:00
contract("AnotherStorage", function() {
2018-01-05 15:10:47 -05:00
this.timeout(0);
2017-02-09 19:38:02 -05:00
2018-04-17 14:48:31 -04:00
it("set SimpleStorage address", async function() {
let result = await AnotherStorage.methods.simpleStorageAddress().call();
assert.equal(result.toString(), SimpleStorage.options.address);
2017-02-09 19:38:02 -05:00
});
});