2016-05-30 00:14:27 +00:00
|
|
|
describe("SimpleStorage", function() {
|
2018-01-12 23:11:24 +00:00
|
|
|
this.timeout(0);
|
2015-10-12 14:50:52 +00:00
|
|
|
before(function(done) {
|
2017-03-08 14:41:16 +00:00
|
|
|
this.timeout(0);
|
2016-10-02 20:57:13 +00:00
|
|
|
var contractsConfig = {
|
|
|
|
"SimpleStorage": {
|
2016-10-16 18:52:04 +00:00
|
|
|
args: [100]
|
2016-10-02 20:57:13 +00:00
|
|
|
}
|
|
|
|
};
|
2018-01-12 23:11:24 +00:00
|
|
|
EmbarkSpec.deployAll(contractsConfig, () => { done() });
|
2015-10-12 14:50:52 +00:00
|
|
|
});
|
|
|
|
|
2018-04-17 18:48:31 +00:00
|
|
|
it("should set constructor value", async function() {
|
|
|
|
let result = await SimpleStorage.methods.storedData().call();
|
|
|
|
assert.equal(result, 100);
|
2015-10-12 14:50:52 +00:00
|
|
|
});
|
|
|
|
|
2018-04-17 18:48:31 +00:00
|
|
|
it("set storage value", async function() {
|
|
|
|
await SimpleStorage.methods.set(150).send();
|
|
|
|
let result = SimpleStorage.methods.get().call();
|
|
|
|
assert.equal(result, 150);
|
2015-10-12 14:50:52 +00:00
|
|
|
});
|
|
|
|
|
2016-08-10 11:59:23 +00:00
|
|
|
});
|