test: update logout redirect assertion
This commit is contained in:
parent
561588624a
commit
250e9c625b
@ -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/",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user