Files
outline/plugins/oidc/server/auth/oidc.test.ts
Apoorv Mishra 67b1fe5514 Local file storage (#5763)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2023-09-20 15:12:03 -07:00

16 lines
536 B
TypeScript

import { getTestServer } from "@server/test/support";
const server = getTestServer();
describe("oidc", () => {
it("should pass query params along with auth redirect", async () => {
const res = await server.get("/auth/oidc?myParam=someParam", {
redirect: "manual",
});
expect(res.headers.get("location")).not.toBeNull();
const redirectLocation = new URL(res.headers.get("location")!);
expect(res.status).toEqual(302);
expect(redirectLocation.searchParams.get("myParam")).toEqual("someParam");
});
});