1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-12-28 15:47:50 +01:00

add additional test for ccJsonLoad

This commit is contained in:
Scott Sadler 2017-07-05 15:09:33 +02:00 committed by Tim Daubenschütz
parent b665752c8c
commit 51585b1b05

View File

@ -67,3 +67,16 @@ test('Fulfillment correctly formed', t => {
txCreate.outputs[0].condition.uri,
new Buffer(msg)))
})
test('CryptoConditions JSON load', t => {
const cond = Transaction.ccJsonLoad({
type: 'threshold-sha-256',
threshold: 1,
subconditions: [{
type: 'ed25519-sha-256',
public_key: 'a'
}],
})
t.truthy(cond.subconditions.length === 1)
})