From e85e3828fd83b551dd3a1e8a115128fc1bf3bf13 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 28 Sep 2022 14:03:05 +0100 Subject: [PATCH] Test fix --- .../tests/{quotas2.spec.js => syncQuotas.spec.js} | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) rename packages/server/src/migrations/functions/tests/{quotas2.spec.js => syncQuotas.spec.js} (62%) diff --git a/packages/server/src/migrations/functions/tests/quotas2.spec.js b/packages/server/src/migrations/functions/tests/syncQuotas.spec.js similarity index 62% rename from packages/server/src/migrations/functions/tests/quotas2.spec.js rename to packages/server/src/migrations/functions/tests/syncQuotas.spec.js index 552eba7701..76a40e4b28 100644 --- a/packages/server/src/migrations/functions/tests/quotas2.spec.js +++ b/packages/server/src/migrations/functions/tests/syncQuotas.spec.js @@ -2,11 +2,13 @@ const TestConfig = require("../../../tests/utilities/TestConfiguration") const syncApps = jest.fn() const syncRows = jest.fn() +const syncPlugins = jest.fn() 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", () => { let config = new TestConfig(false) @@ -17,9 +19,10 @@ describe("run", () => { afterAll(config.end) - it("runs ", async () => { + it("run", async () => { await migration.run() expect(syncApps).toHaveBeenCalledTimes(1) expect(syncRows).toHaveBeenCalledTimes(1) + expect(syncPlugins).toHaveBeenCalledTimes(1) }) })