2015-07-03 22:27:17 -04:00
|
|
|
var Embark = require('embark-framework');
|
|
|
|
Embark.init();
|
|
|
|
Embark.blockchainConfig.loadConfigFile('config/blockchain.yml');
|
|
|
|
Embark.contractsConfig.loadConfigFile('config/contracts.yml');
|
|
|
|
|
|
|
|
var files = ["app/contracts/simple_storage.sol"];
|
|
|
|
|
2015-08-01 11:19:21 -04:00
|
|
|
Embark.contractsConfig.init(files, 'development');
|
2015-07-03 22:27:17 -04:00
|
|
|
var EmbarkSpec = Embark.tests(files);
|
2015-06-15 06:26:38 -04:00
|
|
|
|
|
|
|
describe("SimpleStorage", function() {
|
|
|
|
beforeAll(function() {
|
|
|
|
SimpleStorage = EmbarkSpec.request("SimpleStorage", [150]);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should set constructor value", function() {
|
2015-06-20 08:36:40 -04:00
|
|
|
expect(SimpleStorage.storedData()).toEqual('150');
|
2015-06-15 06:26:38 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
it("set storage value", function() {
|
|
|
|
SimpleStorage.set(100);
|
|
|
|
expect(SimpleStorage.get()).toEqual('100');
|
|
|
|
});
|
|
|
|
|
|
|
|
})
|