aboutsummaryrefslogtreecommitdiffstats
path: root/test/event.js
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-29 19:35:21 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-29 19:35:21 +0800
commit842b8cf323a3b39d9e29ddd831bc41ddb98279ad (patch)
treeeb1684ed47913b02115e35cd894c7da45bcb591c /test/event.js
parent61e8ae2f7be3ced902007a4aa09ce9130c31b33e (diff)
downloaddexon-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/event.js')
-rw-r--r--test/event.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/event.js b/test/event.js
new file mode 100644
index 000000000..0cc9c0c65
--- /dev/null
+++ b/test/event.js
@@ -0,0 +1,25 @@
+var assert = require('assert');
+var event = require('../lib/event.js');
+
+describe('event', function () {
+ it('should create filter input object from given', function () {
+
+ // given
+ var address = '0x012345';
+ var signature = '0x987654';
+ var e = {
+ name: 'test',
+ type: 'event',
+ };
+
+ // when
+ var impl = event(e, address, signature);
+ var result = impl();
+
+ // then
+ assert.equal(result.address, address);
+ assert.equal(result.topics.length, 1);
+ assert.equal(result.topics[0], signature);
+
+ });
+});