chore: utils.gc -> cron.daily (#3543)
This commit is contained in:
16
server/routes/api/cron.test.ts
Normal file
16
server/routes/api/cron.test.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user