From 09f633596da91818201781cc009e1e1ab6f8d059 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Tue, 27 Jan 2015 15:20:22 +0100 Subject: fixed #23 --- test/abi.parsers.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'test') diff --git a/test/abi.parsers.js b/test/abi.parsers.js index 19fa1d4cf..b7a05cea3 100644 --- a/test/abi.parsers.js +++ b/test/abi.parsers.js @@ -823,6 +823,38 @@ describe('abi', function() { }); + it('should parse 0x value', function () { + + // given + var d = clone(description); + d[0].outputs = [ + { type: 'int' } + ]; + + // when + var parser = abi.outputParser(d); + + // then + assert.equal(parser.test("0x")[0], 0); + + }); + + it('should parse 0x value', function () { + + // given + var d = clone(description); + d[0].outputs = [ + { type: 'uint' } + ]; + + // when + var parser = abi.outputParser(d); + + // then + assert.equal(parser.test("0x")[0], 0); + + }); + }); }); -- cgit v1.2.3