mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Squashed 'libjsqrc/ethereumjs/' changes from a0cfa3c..f3e1797
f3e1797 fixed jsonrpc response 0 not handled properly git-subtree-dir: libjsqrc/ethereumjs git-subtree-split: f3e1797153ebf5b19ca3e154cf1240be738e4f08
This commit is contained in:
parent
d9b422cfbc
commit
a82385d541
@ -124,5 +124,20 @@ describe('jsonrpc', function () {
|
|||||||
assert.equal(valid, true);
|
assert.equal(valid, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should validate jsonrpc response with result field === 0', function () {
|
||||||
|
|
||||||
|
// given
|
||||||
|
var response = {
|
||||||
|
jsonrpc: '2.0',
|
||||||
|
id: 1,
|
||||||
|
result: 0
|
||||||
|
};
|
||||||
|
|
||||||
|
// when
|
||||||
|
var valid = jsonrpc.isValidResponse(response);
|
||||||
|
|
||||||
|
// then
|
||||||
|
assert.equal(valid, true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user