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() {
|
2015-10-09 10:18:18 -04:00
|
|
|
beforeAll(function(done) {
|
2015-10-09 10:57:30 -04:00
|
|
|
EmbarkSpec(done);
|
2015-10-09 10:18:18 -04:00
|
|
|
//SimpleStorage = EmbarkSpec.request("SimpleStorage", [150]);
|
2015-06-15 06:26:38 -04:00
|
|
|
});
|
|
|
|
|
2015-10-09 10:18:18 -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
|
|
|
});
|
|
|
|
|
2015-10-09 10:18:18 -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
|
|
|
});
|
|
|
|
|
|
|
|
})
|