From 51585b1b05629bc30018a8647704e48bccfefacf Mon Sep 17 00:00:00 2001 From: Scott Sadler Date: Wed, 5 Jul 2017 15:09:33 +0200 Subject: [PATCH] add additional test for ccJsonLoad --- test/transaction/test_cryptoconditions.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/transaction/test_cryptoconditions.js b/test/transaction/test_cryptoconditions.js index 2c11054..d95e38a 100644 --- a/test/transaction/test_cryptoconditions.js +++ b/test/transaction/test_cryptoconditions.js @@ -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) +})