From a41f943b4319bcccf7c0c81b69a124febed2a866 Mon Sep 17 00:00:00 2001 From: dswbx Date: Tue, 3 Jun 2025 13:06:49 +0200 Subject: [PATCH] fix: cookie setting by only setting on admin routes --- app/__test__/modules/AppAuth.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/__test__/modules/AppAuth.spec.ts b/app/__test__/modules/AppAuth.spec.ts index ede12f6..50c38f2 100644 --- a/app/__test__/modules/AppAuth.spec.ts +++ b/app/__test__/modules/AppAuth.spec.ts @@ -153,6 +153,7 @@ describe("AppAuth", () => { }); await app.build(); + app.registerAdminController(); const spy = spyOn(app.module.auth.authenticator, "requestCookieRefresh"); // register custom route @@ -162,6 +163,10 @@ describe("AppAuth", () => { await app.server.request("/api/system/ping"); await app.server.request("/test"); + expect(spy.mock.calls.length).toBe(0); + + // admin route + await app.server.request("/"); expect(spy.mock.calls.length).toBe(1); });