tests: add coinbase flag to each transaction fixture

This commit is contained in:
Daniel Cousens 2016-11-14 13:45:15 +11:00 committed by Daniel Cousens
parent a9f124423f
commit dfcb04c9b4
2 changed files with 33 additions and 16 deletions

View file

@ -193,13 +193,16 @@ describe('Transaction', function () {
})
describe('isCoinbase', function () {
fixtures.valid.forEach(function (f) {
function verify (f) {
it('should return ' + f.coinbase + ' for ' + f.id, function () {
var tx = Transaction.fromHex(f.hex)
assert.strictEqual(tx.isCoinbase(), f.coinbase)
})
})
}
fixtures.valid.forEach(verify)
fixtures.witness.forEach(verify)
})
describe('hashForSignature', function () {