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

47 lines
1.0 KiB
JavaScript
Raw Normal View History

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
before(function(done) {
this.timeout(0);
2017-02-10 00:38:02 +00:00
var contractsConfig = {
"SimpleStorage": {
args: [100]
},
"AnotherStorage": {
args: ["$SimpleStorage"]
2017-02-10 02:05:45 +00:00
},
"Token": {
deploy: false,
args: [1000]
},
"MyToken": {
instanceOf: "Token"
},
"MyToken2": {
instanceOf: "Token",
args: [2000]
},
2018-03-10 17:52:37 +00:00
"ContractArgs": {
"args": {
"initialValue": 123,
"_addresses": ["$MyToken2", "$SimpleStorage"]
}
},
"SomeContract": {
"args": [
["$MyToken2", "$SimpleStorage"],
100
]
2017-02-10 00:38:02 +00:00
}
};
2017-12-22 18:07:43 +00:00
EmbarkSpec.deployAll(contractsConfig, () => { done() });
2017-02-10 00:38:02 +00:00
});
2017-02-10 02:05:45 +00:00
it("set SimpleStorage address", function(done) {
2018-01-05 20:10:47 +00:00
AnotherStorage.methods.simpleStorageAddress().call().then(function(result) {
assert.equal(result.toString(), SimpleStorage.options.address);
2017-02-10 00:38:02 +00:00
done();
});
});
});