tests: use hardcoded fixture instead of relying on fixture[0]
This commit is contained in:
parent
b5e46c2931
commit
11079bfafb
1 changed files with 1 additions and 3 deletions
|
@ -99,14 +99,12 @@ describe('Transaction', function () {
|
||||||
describe('addInput', function () {
|
describe('addInput', function () {
|
||||||
var prevTxHash
|
var prevTxHash
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
var f = fixtures.valid[0]
|
prevTxHash = new Buffer('ffffffff00ffff000000000000000000000000000000000000000000101010ff', 'hex')
|
||||||
prevTxHash = new Buffer(f.hash, 'hex')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('accepts a transaction hash', function () {
|
it('accepts a transaction hash', function () {
|
||||||
var tx = new Transaction()
|
var tx = new Transaction()
|
||||||
tx.addInput(prevTxHash, 0)
|
tx.addInput(prevTxHash, 0)
|
||||||
|
|
||||||
assert.deepEqual(tx.ins[0].hash, prevTxHash)
|
assert.deepEqual(tx.ins[0].hash, prevTxHash)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue