Skip to content

Commit

Permalink
Add test to ensure checkStatus is not called on a VC w/o a status.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Dec 6, 2023
1 parent 64048ac commit b1398f6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/10-verify.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,27 @@ describe('verify API (credentials)', () => {
}
result.verified.should.be.false;
});
it('should not run checkStatus on a vc with out a credentialStatus',
async () => {
const credential = jsonld.clone(mockCredential);
const verifiableCredential = await vc.issue({
credential,
suite,
documentLoader
});
const result = await vc.verifyCredential({
credential: verifiableCredential,
controller: assertionController,
suite,
documentLoader,
// ensure any checkStatus call will fail verification
checkStatus: async () => ({verified: false})
});
if(result.error) {
throw result.error;
}
result.verified.should.be.true;
});
it('should fail to verify a changed derived vc', async () => {
const proofId = `urn:uuid:${uuid()}`;
// setup ecdsa-sd-2023 suite for signing selective disclosure VCs
Expand Down

0 comments on commit b1398f6

Please sign in to comment.