embark/demo/spec/contracts/simple_storage_spec.js

27 lines
652 B
JavaScript
Raw Normal View History

2015-10-09 10:57:30 -04:00
var EmbarkSpec = require('embark-framework').test;
2015-06-15 06:26:38 -04:00
describe("SimpleStorage", function() {
beforeAll(function(done) {
2015-10-09 10:57:30 -04:00
EmbarkSpec(done);
//SimpleStorage = EmbarkSpec.request("SimpleStorage", [150]);
2015-06-15 06:26:38 -04:00
});
it("should set constructor value", function(done) {
SimpleStorage.storedData(function(err, result) {
expect(result.toNumber()).toEqual(100);
done();
});
2015-06-15 06:26:38 -04:00
});
it("set storage value", function(done) {
SimpleStorage.set(150, function() {
SimpleStorage.get(function(err, result) {
console.log(arguments);
expect(result.toNumber()).toEqual(150);
done();
});
});
2015-06-15 06:26:38 -04:00
});
})