Skip to content

Commit

Permalink
Squashed 'libjsqrc/ethereumjs/' changes from a0cfa3c..f3e1797
Browse files Browse the repository at this point in the history
f3e1797 fixed jsonrpc response 0 not handled properly

git-subtree-dir: libjsqrc/ethereumjs
git-subtree-split: f3e1797153ebf5b19ca3e154cf1240be738e4f08
  • Loading branch information
debris committed Feb 4, 2015
1 parent 0b90e3d commit 9baeed4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/jsonrpc.isValidResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});

0 comments on commit 9baeed4

Please sign in to comment.