mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
test(integration): compare the oidc refusals without their request ids
This commit is contained in:
1 parent
24c74bd3eb
commit
9c01e179ca
1 file changed
+4
-1
@@ -12,6 +12,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { cookieJar, headerJar } from "./mock-next-headers";
|
||||
import { getPrismaClient, truncateAllTables } from "./setup";
|
||||
import { bodyWithoutRequestId } from "@/__tests__/helpers/error-envelope";
|
||||
|
||||
process.env.API_TOKEN_HMAC_KEY ??=
|
||||
"test-hmac-key-oidc-pending-link-32-bytes-minimum-1234567890";
|
||||
@@ -186,7 +187,9 @@ describe("under an SSO-only policy", () => {
|
||||
const wrong = await passwordLogin("acct-b", "not the password");
|
||||
expect(right.status).toBe(403);
|
||||
expect(wrong.status).toBe(403);
|
||||
expect(await wrong.json()).toEqual(await right.json());
|
||||
expect(await bodyWithoutRequestId(wrong)).toBe(
|
||||
await bodyWithoutRequestId(right),
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps it closed for any other account", async () => {
|
||||
|
||||
Reference in new issue
Block a user