diff options
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); + }); }); }); |