Skip to content

Commit

Permalink
test: update mock etag values
Browse files Browse the repository at this point in the history
  • Loading branch information
francisfuzz committed Sep 16, 2024
1 parent 13fbe9e commit a975a31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/verification.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ test("fetchVerificationKeys() - returns cached keys on 304 response", async (t)
request: { fetch: fetchMock },
});

const cache = { id: "etag-value", keys: publicKeys };
const cache = { id: 'W/"db60f89fb432b6c2362ac024c9322df5e6e2a8326595f7c1d35f807767d66e85"', keys: publicKeys };

const result = await fetchVerificationKeys({
request: testRequest,
Expand Down Expand Up @@ -236,7 +236,7 @@ test("fetchVerificationKeys() - populates and utilizes cache correctly", async (
{
headers: {
"content-type": "application/json",
"etag": "etag-value",
"etag": 'W/"db60f89fb432b6c2362ac024c9322df5e6e2a8326595f7c1d35f807767d66e85"',
"x-request-id": "<request-id>",
},
},
Expand All @@ -251,7 +251,7 @@ test("fetchVerificationKeys() - populates and utilizes cache correctly", async (
request: testRequest,
});

const expectedCache = { id: "etag-value", keys: publicKeys };
const expectedCache = { id: 'W/"db60f89fb432b6c2362ac024c9322df5e6e2a8326595f7c1d35f807767d66e85"', keys: publicKeys };
t.deepEqual(firstResult, expectedCache);

// Second request: respond with 304
Expand Down

0 comments on commit a975a31

Please sign in to comment.