added better test

This commit is contained in:
Fabian Vogelsteller 2017-05-24 15:01:47 +02:00
parent 0fdecce986
commit d4bb4d5978
No known key found for this signature in database
GPG Key ID: E51EADA77F1A4124

View File

@ -75,7 +75,7 @@ describe('contract', function () {
topics: [
'0x' + sha3(signature),
'0x0000000000000000000000001234567890123456789012345678901234567891',
null
'0x000000000000000000000000000000000000000000000000000000000000000a'
],
address: '0x1234567890123456789012345678901234567891'
});
@ -117,7 +117,7 @@ describe('contract', function () {
var contract = web3.eth.contract(desc).at(address);
var res = 0;
var event = contract.Changed({from: address});
var event = contract.Changed({from: address, amount: 10});
event.watch(function(err, result) {
assert.equal(result.args.from, address);
assert.equal(result.args.amount, 1);