Skip to content

Commit

Permalink
test: Test full prod url is generated
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Dec 2, 2024
1 parent 888091e commit 8f1ff37
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions api.planx.uk/modules/file/file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit 8f1ff37

Please sign in to comment.