import { makeAppObjectRepo } from "@vived/core";
import { makeClearCorrectObjectIdsUCMock } from "../Mocks/ClearCorrectObjectIdsUCMock";
import { clearCorrectObjectPickIDs } from "./clearCorrectObjectPickIDs";
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const mockUC = makeClearCorrectObjectIdsUCMock(appObjects);
    return { appObjects, mockUC };
}
describe("Clear correct object pick IDs", () => {
    it("Calls the UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        clearCorrectObjectPickIDs(appObjects);
        expect(mockUC.clearCorrectObjectIds).toHaveBeenCalledWith();
    });
    it("Warns if there is no UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        mockUC.dispose();
        appObjects.submitWarning = jest.fn();
        clearCorrectObjectPickIDs(appObjects);
        expect(appObjects.submitWarning).toHaveBeenCalled();
    });
});
//# sourceMappingURL=clearCorrectObjectPickIDs.test.js.map