Files
outline/server/routes/api/cron.test.ts
2022-05-16 12:44:22 -07:00

17 lines
461 B
TypeScript

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);
});
});