test: update logout redirect assertion

This commit is contained in:
Tyler Gillispie 2026-08-24 16:23:12 -07:00
parent 561588624a
commit 250e9c625b

View File

@ -520,18 +520,12 @@ Deno.test("Tier 1 & 2: POST /api/guests/sandbox - Creates guest session", async
Deno.test("Logout Return-Path Validation", async (t) => { Deno.test("Logout Return-Path Validation", async (t) => {
await t.step("GET /logout preserves valid redirect", async () => { await t.step("GET /logout preserves valid redirect", async () => {
const res = await app.request( const req = new Request("http://localhost/logout?redirect=https://ed-droid.atyg.org/");
"/logout?redirect=https://ed-droid.atyg.org/", const res = await app.fetch(req);
{
method: "GET",
},
);
assertEquals(res.status, 302); assertEquals(res.status, 302);
const location = res.headers.get("location");
assertExists(location);
assertEquals( assertEquals(
location, res.headers.get("Location"),
"/login?redirect=https%3A%2F%2Fed-droid.atyg.org%2F", "https://ed-droid.atyg.org/",
); );
}); });