This commit is contained in:
Marek Kotewicz
2015-01-29 12:35:21 +01:00
parent 61e8ae2f7b
commit 842b8cf323
10 changed files with 106 additions and 10 deletions

View File

@@ -146,7 +146,6 @@ describe('contract', function() {
// given
var description = [{
"name": "test(uint256)",
"type": "event",
"inputs": [{
"name": "a",
"type": "uint256"
@@ -168,5 +167,35 @@ describe('contract', function() {
assert.equal('undefined', typeof con.test);
});
it('should create contract with one event', function () {
// given
var description = [{
"name": "test",
"type": "event",
"inputs": [{
"name": "a",
"type": "uint256"
}
],
"outputs": [
{
"name": "d",
"type": "uint256"
}
]
}];
// when
var con = contract(null, description);
// then
assert.equal('function', typeof con.test);
assert.equal('function', typeof con.test['uint256']);
});
});