Skip to content

Commit

Permalink
WIP: fix GConsent denied tests, all unit tests are now passing
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr committed Sep 27, 2023
1 parent a16ac1c commit 04f38d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/gConsent/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const ACCESS_GRANT_STATUS = Object.freeze(
GC_CONSENT_STATUS_EXPLICITLY_GIVEN,
GC_CONSENT_STATUS_DENIED_ABBREV,
"gc:ConsentStatusDenied",
"Consent:StatusDenied",
GC_CONSENT_STATUS_EXPLICITLY_GIVEN_ABBREV,
]),
);
Expand Down
11 changes: 10 additions & 1 deletion src/gConsent/manage/getAccessGrant.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,16 @@ describe("getAccessGrant", () => {
const accessGrant = await getAccessGrant("https://some.vc.url", {
fetch: mockedFetch,
});
expect(withoutDataset(accessGrant)).toEqual(withoutDataset(mockAccessGrant));
expect(withoutDataset(accessGrant)).toEqual({
...withoutDataset(mockAccessGrant),
credentialSubject: {
...withoutDataset(mockAccessGrant).credentialSubject,
providedConsent: {
...withoutDataset(mockAccessGrant).credentialSubject.providedConsent,
hasStatus: 'Consent:StatusDenied'
}
}
});
});

it("returns the access grant with the given IRI", async () => {
Expand Down

0 comments on commit 04f38d7

Please sign in to comment.