Finished adding unit and integration tests to blockbook API balance and utxo

This commit is contained in:
Chris Troutner
2019-06-09 15:04:30 -07:00
parent 07313784af
commit d15e11b75e
4 changed files with 35 additions and 86 deletions
+8 -39
View File
@@ -336,7 +336,7 @@ describe("#Blockbook Router", () => {
assert.equal(result.length, 2, "2 outputs for 2 inputs")
})
})
/*
describe("#UTXOs Single", () => {
// details route handler.
const utxosSingle = blockbookRoute.testableComponents.utxosSingle
@@ -422,18 +422,10 @@ describe("#Blockbook Router", () => {
assert.isArray(result)
assert.hasAnyKeys(result[0], [
"_id",
"chain",
"network",
"coinbase",
"mintIndex",
"spentTxid",
"mintTxid",
"mintHeight",
"spentHeight",
"address",
"script",
"txid",
"vout",
"value",
"height",
"confirmations"
])
})
@@ -561,18 +553,10 @@ describe("#Blockbook Router", () => {
assert.isArray(result)
assert.isArray(result[0])
assert.hasAnyKeys(result[0][0], [
"_id",
"chain",
"network",
"coinbase",
"mintIndex",
"spentTxid",
"mintTxid",
"mintHeight",
"spentHeight",
"address",
"script",
"txid",
"vout",
"value",
"height",
"confirmations"
])
})
@@ -599,22 +583,7 @@ describe("#Blockbook Router", () => {
assert.isArray(result)
assert.isArray(result[0])
assert.hasAnyKeys(result[0][0], [
"_id",
"chain",
"network",
"coinbase",
"mintIndex",
"spentTxid",
"mintTxid",
"mintHeight",
"spentHeight",
"address",
"script",
"value",
"confirmations"
])
assert.equal(result.length, 2, "2 outputs for 2 inputs")
})
})
*/
})
+5 -14
View File
@@ -20,20 +20,11 @@ const mockBalance = {
const mockUtxos = [
{
_id: "5cf2c31a33bd46a95ec7e730",
chain: "BCH",
network: "testnet",
coinbase: false,
mintIndex: 1,
spentTxid: "",
mintTxid:
"5fe9b74056319a8c87f45cc745030715a6180758b94938dbf90d639d55652392",
mintHeight: 1265275,
spentHeight: -2,
address: "qq89kjkeqz9mngp8kl3dpmu43y2wztdjqu500gn4c4",
script: "76a9140e5b4ad9008bb9a027b7e2d0ef958914e12db20788ac",
value: 10000000,
confirmations: -1
txid: "5fe9b74056319a8c87f45cc745030715a6180758b94938dbf90d639d55652392",
vout: 1,
value: "10000000",
height: 1265275,
confirmations: 42704
}
]