snt-gas-relay/test-dapp/test/identityfactory.js
Ricardo Guilherme Schmidt a7f807b6ff
fix factory
2018-10-27 19:57:45 +02:00

28 lines
721 B
JavaScript

const IdentityFactory = require('Embark/contracts/IdentityFactory');
const IdentityGasRelay = require('Embark/contracts/IdentityGasRelay');
var contractsConfig = {
"IdentityFactory": {
}
};
config({ contracts: contractsConfig });
contract('IdentityFactory', function () {
describe('createIdentity()', function () {
it('should create an IdentityGasRelay', async function () {
let result = await IdentityFactory.createIdentity();
createdIdentity = new web3.eth.Contract(
IdentityGasRelay.options.jsonInterface,
result.events.IdentityCreated.returnValues.instance
);
assert(await createdIdentity.methods.nonce().call(), 0);
});
});
});