Rename __hasWitnesses -> hasWitnesses, and add tests

This commit is contained in:
Thomas Kerin 2016-12-07 13:04:31 +01:00 committed by Daniel Cousens
parent e92ac1d01b
commit bec7f690ce
2 changed files with 12 additions and 4 deletions

View file

@ -119,6 +119,14 @@ describe('Transaction', function () {
})
})
describe('hasWitnesses', function () {
fixtures.valid.forEach(function (f) {
it('detects if the transaction has witnesses: ' + (f.whex ? 'true' : 'false'), function () {
assert.strictEqual(Transaction.fromHex(f.whex ? f.whex : f.hex).hasWitnesses(), !!f.whex)
})
})
})
describe('addInput', function () {
var prevTxHash
beforeEach(function () {