Skip to content

Commit

Permalink
fix presentation test
Browse files Browse the repository at this point in the history
Signed-off-by: F-Node-Karlsruhe <christian.fries@eecc.de>
  • Loading branch information
F-Node-Karlsruhe committed Jun 14, 2023
1 parent b5973da commit c257269
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions api/__tests__/presentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,13 @@ describe("Verifier API Test for Presentations", () => {
});
});

test("Falsify single presentation without challenge", async () => {
const res = await request(app).post("/api/verifier").query({ domain: 'ssi.eecc.de/verifier' }).send([domainPresentation]);
expect(res.statusCode).toEqual(400);
test("Falsify single presentation with wrong challenge", async () => {
const res = await request(app).post("/api/verifier").query({ challenge: 'falseChallenge', domain: 'ssi.eecc.de/verifier' }).send([domainPresentation]);
expect(res.statusCode).toEqual(200);
expect(res.body[0]).toHaveProperty('verified');
expect(res.body[0].verified).toBe(false);
expect(res.body[0]).toHaveProperty('error');
expect(res.body[0].error.name).toBe('VerificationError');
});

});

0 comments on commit c257269

Please sign in to comment.