1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-06-28 16:47:45 +02:00

add additional test for ccJsonLoad

This commit is contained in:
Scott Sadler 2017-07-05 15:09:33 +02:00
parent 0a400550a3
commit 1a61cde58d

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)
})