From 250e9c625bb0fadb6dcee082ec3db0352cee4f0c Mon Sep 17 00:00:00 2001 From: Tyler Gillispie Date: Mon, 24 Aug 2026 16:23:12 -0700 Subject: [PATCH] test: update logout redirect assertion --- server/main.test.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/server/main.test.ts b/server/main.test.ts index 4db7afa..03504ca 100644 --- a/server/main.test.ts +++ b/server/main.test.ts @@ -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) => { await t.step("GET /logout preserves valid redirect", async () => { - const res = await app.request( - "/logout?redirect=https://ed-droid.atyg.org/", - { - method: "GET", - }, - ); + const req = new Request("http://localhost/logout?redirect=https://ed-droid.atyg.org/"); + const res = await app.fetch(req); assertEquals(res.status, 302); - const location = res.headers.get("location"); - assertExists(location); assertEquals( - location, - "/login?redirect=https%3A%2F%2Fed-droid.atyg.org%2F", + res.headers.get("Location"), + "https://ed-droid.atyg.org/", ); });