diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-29 19:35:21 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-29 19:35:21 +0800 |
commit | 842b8cf323a3b39d9e29ddd831bc41ddb98279ad (patch) | |
tree | eb1684ed47913b02115e35cd894c7da45bcb591c /test/eth.contract.js | |
parent | 61e8ae2f7be3ced902007a4aa09ce9130c31b33e (diff) | |
download | dexon-842b8cf323a3b39d9e29ddd831bc41ddb98279ad.tar dexon-842b8cf323a3b39d9e29ddd831bc41ddb98279ad.tar.gz dexon-842b8cf323a3b39d9e29ddd831bc41ddb98279ad.tar.bz2 dexon-842b8cf323a3b39d9e29ddd831bc41ddb98279ad.tar.lz dexon-842b8cf323a3b39d9e29ddd831bc41ddb98279ad.tar.xz dexon-842b8cf323a3b39d9e29ddd831bc41ddb98279ad.tar.zst dexon-842b8cf323a3b39d9e29ddd831bc41ddb98279ad.zip |
event.js
Diffstat (limited to 'test/eth.contract.js')
-rw-r--r-- | test/eth.contract.js | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/test/eth.contract.js b/test/eth.contract.js index 945700cf9..1a92ec88f 100644 --- a/test/eth.contract.js +++ b/test/eth.contract.js @@ -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']); + + }); + }); |