diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-02-04 18:26:19 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-02-04 18:26:19 +0800 |
commit | 859a1999cb204d2c6fcb08d6569c738c5af5cd86 (patch) | |
tree | cc6379b712a577c73df29f17214f4cbfddecb23a /test/jsonrpc.isValidResponse.js | |
parent | a0cfa3ca21163f26f3f71a0e2ce0a1e617554c72 (diff) | |
parent | f3e1797153ebf5b19ca3e154cf1240be738e4f08 (diff) | |
download | go-tangerine-859a1999cb204d2c6fcb08d6569c738c5af5cd86.tar go-tangerine-859a1999cb204d2c6fcb08d6569c738c5af5cd86.tar.gz go-tangerine-859a1999cb204d2c6fcb08d6569c738c5af5cd86.tar.bz2 go-tangerine-859a1999cb204d2c6fcb08d6569c738c5af5cd86.tar.lz go-tangerine-859a1999cb204d2c6fcb08d6569c738c5af5cd86.tar.xz go-tangerine-859a1999cb204d2c6fcb08d6569c738c5af5cd86.tar.zst go-tangerine-859a1999cb204d2c6fcb08d6569c738c5af5cd86.zip |
Merge pull request #55 from ethereum/develop
fixed jsonrpc result field 0 not handled properly
Diffstat (limited to 'test/jsonrpc.isValidResponse.js')
-rw-r--r-- | test/jsonrpc.isValidResponse.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/jsonrpc.isValidResponse.js b/test/jsonrpc.isValidResponse.js index 2fe200496..920b5f3a9 100644 --- a/test/jsonrpc.isValidResponse.js +++ b/test/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); + }); }); }); |