1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-11-22 17:50:09 +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
parent fb7dd5580a
commit 4a349013b2

View File

@ -83,3 +83,16 @@ test('CryptoConditions JSON load', t => {
}) })
t.truthy(cond.subconditions.length === 2) t.truthy(cond.subconditions.length === 2)
}) })
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)
})