diff --git a/test/web3.eth.defaultBlock.js b/test/web3.eth.defaultBlock.js new file mode 100644 index 0000000..5fc60df --- /dev/null +++ b/test/web3.eth.defaultBlock.js @@ -0,0 +1,12 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); + +describe('web3.eth', function () { + describe('defaultBlock', function () { + it('should check if defaultBlock is set to proper value', function () { + assert.equal(web3.eth.defaultBlock, 'latest'); + }); + }); +}); + diff --git a/test/web3.eth.getBalance.js b/test/web3.eth.getBalance.js index 9e9d110..890557e 100644 --- a/test/web3.eth.getBalance.js +++ b/test/web3.eth.getBalance.js @@ -28,6 +28,24 @@ var tests = [{ result: '0x31981', formattedResult: new BigNumber('0x31981', 16), call: 'eth_'+ method +}, { + args: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', 0x1], + formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['1255171934823351805979544608257289442498956485798', 0x1], + formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['1255171934823351805979544608257289442498956485798'], + formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', 'latest'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method }]; testMethod.runTests('eth', method, tests);