tidy up
This commit is contained in:
parent
943bd54879
commit
7842c5ccac
|
@ -1,10 +1,10 @@
|
||||||
import generator from "../../generator"
|
import generator from "../../generator"
|
||||||
// import {
|
import {
|
||||||
// Application,
|
Application,
|
||||||
// CreateApplicationParams,
|
} from "@budibase/server/api/controllers/public/mapping/types"
|
||||||
// } from "@budibase/server/api/controllers/public/mapping/types"
|
|
||||||
|
|
||||||
const generate = (overrides: any = {}): any => ({
|
|
||||||
|
const generate = (overrides: Partial<Application> = {}): Partial<Application> => ({
|
||||||
name: generator.word(),
|
name: generator.word(),
|
||||||
url: `/${generator.word()}`,
|
url: `/${generator.word()}`,
|
||||||
...overrides,
|
...overrides,
|
||||||
|
|
|
@ -33,10 +33,7 @@ describe("Internal API - /applications endpoints", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it("POST - Create an application", async () => {
|
it("POST - Create an application", async () => {
|
||||||
const [response, app] = await config.applications.create({
|
const [response, app] = await config.applications.create(generateApp())
|
||||||
...generateApp(),
|
|
||||||
useTemplate: false
|
|
||||||
})
|
|
||||||
expect(response).toHaveStatusCode(200)
|
expect(response).toHaveStatusCode(200)
|
||||||
expect(app._id).toBeDefined()
|
expect(app._id).toBeDefined()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue