Skip to content

Commit

Permalink
Merge pull request #163 from bigchaindb/test-coverage
Browse files Browse the repository at this point in the history
Increase test coverage
  • Loading branch information
kremalicious committed May 9, 2018
2 parents 5cb24cf + 22e0a59 commit ba43fe4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/transaction/test_cryptoconditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ test('Ed25519 condition encoding', t => {
t.deepEqual(target, Transaction.makeEd25519Condition(publicKey))
})

test('Sha256Condition fulfillment', t => {
const preimage = 'secret'
const target = {
details: {
type_id: 0,
bitmask: 3,
preimage,
type: 'fulfillment'
},
uri: 'ni:///sha-256;K7gNU3sdo-OL0wNhqoVWhr3g6s1xYv72ol_pe_Unols?fpt=preimage-sha-256&cost=6'
}
t.deepEqual(target, Transaction.makeSha256Condition(preimage))
})


test('Threshold condition encoding', t => {
const publicKey = '4zvwRjXUKGfvwnParsHAS3HuSVzV5cA4McphgmoCtajS'
Expand Down

0 comments on commit ba43fe4

Please sign in to comment.