Also, we have no tests for the first proof in a record write operation because it is currently a MOCKPROOF.
When we remove the MOCKPROOF for a real ledgerWrite proof we need to also add a set of tests that ensure that ledgerWrites fail if
[ ] The invocationTarget has the wrong <incorrect-ledgerId>/records
[ ] The invocationTarget has a unknown path <ledgerId>/unknown
[ ] The capability id for the ledgerWrite proof is invalid capability: urn:zcap:invalid:foo
[ ] The capability id for the ledgerWrite proof refers to a non-existent ledger (this might succeed) urn:zcap:root:did:non:existent:ledger
We have tests for when the invocationTarget doesn't match, but we need tests for when you have the wrong root capability.
We need tests that hit this check in zcapld: https://github.com/digitalbazaar/zcapld/blob/e655ba0e67cbbf8d72467e7d650365bbe936a1c3/lib/utils.js#L522-L525
Also, we have no tests for the first proof in a record write operation because it is currently a
MOCKPROOF
. When we remove theMOCKPROOF
for a real ledgerWrite proof we need to also add a set of tests that ensure that ledgerWrites fail if<incorrect-ledgerId>/records
<ledgerId>/unknown
capability: urn:zcap:invalid:foo
urn:zcap:root:did:non:existent:ledger