diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-02-04 18:24:10 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-02-04 18:24:10 +0800 |
commit | a82385d5418bfb9efa59fffe4f47848451501597 (patch) | |
tree | 703270ef4335eac2f495581dec82da8723dcd02b | |
parent | d9b422cfbc5959c1f476e32633a1aec432610b94 (diff) | |
download | dexon-solidity-a82385d5418bfb9efa59fffe4f47848451501597.tar dexon-solidity-a82385d5418bfb9efa59fffe4f47848451501597.tar.gz dexon-solidity-a82385d5418bfb9efa59fffe4f47848451501597.tar.bz2 dexon-solidity-a82385d5418bfb9efa59fffe4f47848451501597.tar.lz dexon-solidity-a82385d5418bfb9efa59fffe4f47848451501597.tar.xz dexon-solidity-a82385d5418bfb9efa59fffe4f47848451501597.tar.zst dexon-solidity-a82385d5418bfb9efa59fffe4f47848451501597.zip |
Squashed 'libjsqrc/ethereumjs/' changes from a0cfa3c..f3e1797
f3e1797 fixed jsonrpc response 0 not handled properly
git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f3e1797153ebf5b19ca3e154cf1240be738e4f08
-rw-r--r-- | jsonrpc.isValidResponse.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/jsonrpc.isValidResponse.js b/jsonrpc.isValidResponse.js index 2fe20049..920b5f3a 100644 --- a/jsonrpc.isValidResponse.js +++ b/jsonrpc.isValidResponse.js @@ -124,5 +124,20 @@ describe('jsonrpc', function () { 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); + }); }); }); |