From 8f1ff37873dfcc3e8007c1d9478c3bb0fdc956cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Mon, 2 Dec 2024 11:13:25 +0000 Subject: [PATCH] test: Test full prod url is generated --- api.planx.uk/modules/file/file.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api.planx.uk/modules/file/file.test.ts b/api.planx.uk/modules/file/file.test.ts index bf883dd49e..321b400d96 100644 --- a/api.planx.uk/modules/file/file.test.ts +++ b/api.planx.uk/modules/file/file.test.ts @@ -108,7 +108,7 @@ describe("File upload", () => { }); it("should generate a correct URL on production", async () => { - vi.stubEnv("API_URL_EXT", "https://api.editor.planx.dev"); + vi.stubEnv("API_URL_EXT", "https://api.editor.planx.uk"); vi.stubEnv("NODE_ENV", "production"); await supertest(app) @@ -118,9 +118,8 @@ describe("File upload", () => { .then((res) => { expect(res.body).toEqual({ fileType: "text/plain", - fileUrl: expect.stringContaining( - "/file/private/nanoid/modified%20key", - ), + fileUrl: + "https://api.editor.planx.uk/file/private/nanoid/modified%20key", }); }); expect(mockPutObject).toHaveBeenCalledTimes(1);