chore: utils.gc -> cron.daily (#3543)

This commit is contained in:
Tom Moor
2022-05-16 12:44:22 -07:00
committed by GitHub
parent 4c15f27bb2
commit b8a02df7ba
3 changed files with 12 additions and 6 deletions

View File

@@ -0,0 +1,16 @@
import TestServer from "fetch-test-server";
import webService from "@server/services/web";
import { flushdb } from "@server/test/support";
const app = webService();
const server = new TestServer(app.callback());
beforeEach(() => flushdb());
afterAll(() => server.close());
describe("#cron.daily", () => {
it("should require authentication", async () => {
const res = await server.post("/api/cron.daily");
expect(res.status).toEqual(401);
});
});