1
0
Fork 0
mirror of synced 2024-08-15 18:11:40 +12:00

Adding context update to test case since it used to rely on the context update functionality.

This commit is contained in:
mike12345567 2023-01-30 10:59:54 +00:00
parent 2548d89f04
commit 49da99c8ac

View file

@ -2,7 +2,7 @@ import TestConfig from "../../../../tests/utilities/TestConfiguration"
import * as syncRows from "../syncRows"
import { quotas } from "@budibase/pro"
import { QuotaUsageType, StaticQuotaName } from "@budibase/types"
const { db: dbCore } = require("@budibase/backend-core")
import { db as dbCore, context } from "@budibase/backend-core"
describe("syncRows", () => {
let config = new TestConfig(false)
@ -24,13 +24,17 @@ describe("syncRows", () => {
// app 1
const app1 = config.app
await config.createTable()
await config.createRow()
await context.doInAppContext(app1.appId, async () => {
await config.createTable()
await config.createRow()
})
// app 2
const app2 = await config.createApp("second-app")
await config.createTable()
await config.createRow()
await config.createRow()
await context.doInAppContext(app2.appId, async () => {
await config.createTable()
await config.createRow()
await config.createRow()
})
// migrate
await syncRows.run()