Test fix
This commit is contained in:
parent
d87e3904ae
commit
e85e3828fd
|
@ -2,11 +2,13 @@ const TestConfig = require("../../../tests/utilities/TestConfiguration")
|
||||||
|
|
||||||
const syncApps = jest.fn()
|
const syncApps = jest.fn()
|
||||||
const syncRows = jest.fn()
|
const syncRows = jest.fn()
|
||||||
|
const syncPlugins = jest.fn()
|
||||||
|
|
||||||
jest.mock("../usageQuotas/syncApps", () => ({ run: syncApps }) )
|
jest.mock("../usageQuotas/syncApps", () => ({ run: syncApps }) )
|
||||||
jest.mock("../usageQuotas/syncAppRows", () => ({ run: syncRows }) )
|
jest.mock("../usageQuotas/syncRows", () => ({ run: syncRows }) )
|
||||||
|
jest.mock("../usageQuotas/syncPlugins", () => ({ run: syncPlugins }) )
|
||||||
|
|
||||||
const migration = require("../quotas2")
|
const migration = require("../syncQuotas")
|
||||||
|
|
||||||
describe("run", () => {
|
describe("run", () => {
|
||||||
let config = new TestConfig(false)
|
let config = new TestConfig(false)
|
||||||
|
@ -17,9 +19,10 @@ describe("run", () => {
|
||||||
|
|
||||||
afterAll(config.end)
|
afterAll(config.end)
|
||||||
|
|
||||||
it("runs ", async () => {
|
it("run", async () => {
|
||||||
await migration.run()
|
await migration.run()
|
||||||
expect(syncApps).toHaveBeenCalledTimes(1)
|
expect(syncApps).toHaveBeenCalledTimes(1)
|
||||||
expect(syncRows).toHaveBeenCalledTimes(1)
|
expect(syncRows).toHaveBeenCalledTimes(1)
|
||||||
|
expect(syncPlugins).toHaveBeenCalledTimes(1)
|
||||||
})
|
})
|
||||||
})
|
})
|
Loading…
Reference in New Issue