From f07cb6bd74b31dcf5fd8a753836ec7527162c05a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 22 Oct 2024 16:37:58 +0200 Subject: [PATCH] Fix test --- .../server/src/api/routes/tests/application.spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/routes/tests/application.spec.ts b/packages/server/src/api/routes/tests/application.spec.ts index b654e577ba..47b6776610 100644 --- a/packages/server/src/api/routes/tests/application.spec.ts +++ b/packages/server/src/api/routes/tests/application.spec.ts @@ -21,6 +21,7 @@ import tk from "timekeeper" import * as uuid from "uuid" import { structures } from "@budibase/backend-core/tests" import nock from "nock" +import path from "path" describe("/applications", () => { let config = setup.getConfig() @@ -137,10 +138,17 @@ describe("/applications", () => { }) it("creates app from template", async () => { + nock("https://prod-budi-templates.s3-eu-west-1.amazonaws.com") + .get(`/templates/app/agency-client-portal.tar.gz`) + .replyWithFile( + 200, + path.resolve(__dirname, "data", "agency-client-portal.tar.gz") + ) + const app = await config.api.application.create({ name: utils.newid(), useTemplate: "true", - templateKey: "test", + templateKey: "app/agency-client-portal", }) expect(app._id).toBeDefined() expect(events.app.created).toHaveBeenCalledTimes(1)