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