This commit is contained in:
Adria Navarro 2024-10-22 16:37:58 +02:00
parent b85a28fdf6
commit f07cb6bd74
1 changed files with 9 additions and 1 deletions

View File

@ -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)