import { makeAppObjectRepo } from "@vived/core";
import { makeDeleteAllCalloutsUC } from "../UC/DeleteAllCalloutsUC";
import { deleteAllCallouts } from "./deleteAllCallouts";
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const deleteAllCalloutsUC = makeDeleteAllCalloutsUC(appObjects.getOrCreate("App"));
    const mockDeleteAllCallouts = jest.fn();
    deleteAllCalloutsUC.deleteAllCallouts = mockDeleteAllCallouts;
    return {
        appObjects,
        mockDeleteAllCallouts,
    };
}
describe("Delete All Callouts Controller", () => {
    it("Calls deleteAllCallouts", () => {
        const { appObjects, mockDeleteAllCallouts } = makeTestRig();
        deleteAllCallouts(appObjects);
        expect(mockDeleteAllCallouts).toHaveBeenCalled();
    });
    it("Submits warning if not found DeleteAllCalloutsUC", () => {
        const appObjects = makeAppObjectRepo();
        const mockSubmitWarning = jest.fn();
        appObjects.submitWarning = mockSubmitWarning;
        deleteAllCallouts(appObjects);
        expect(mockSubmitWarning).toHaveBeenCalled();
    });
});
//# sourceMappingURL=deleteAllCallouts.test.js.map