From 2a202b3194a04c94eac0ed1fe0e1097fa71340ef Mon Sep 17 00:00:00 2001 From: pandeymangg Date: Mon, 8 Sep 2025 11:54:29 +0530 Subject: [PATCH] fix test --- apps/web/modules/storage/service.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/modules/storage/service.test.ts b/apps/web/modules/storage/service.test.ts index 982b1a524a..9d77f3d10c 100644 --- a/apps/web/modules/storage/service.test.ts +++ b/apps/web/modules/storage/service.test.ts @@ -128,7 +128,7 @@ describe("storage service", () => { } }); - test("should properly encode filenames with special characters like # in URL", async () => { + test("should properly sanitize filenames with special characters like # in URL", async () => { const mockSignedUrlResponse = { ok: true, data: { @@ -150,12 +150,12 @@ describe("storage service", () => { if (result.ok) { // The filename should be URL-encoded to prevent # from being treated as a URL fragment expect(result.data.fileUrl).toBe( - `https://public.example.com/storage/env-123/public/test%23file--fid--${mockUUID}.txt` + `https://public.example.com/storage/env-123/public/testfile--fid--${mockUUID}.txt` ); } expect(getSignedUploadUrl).toHaveBeenCalledWith( - `test#file--fid--${mockUUID}.txt`, + `testfile--fid--${mockUUID}.txt`, "text/plain", "env-123/public", 1024 * 1024 * 10 // 10MB default