import { makeAppObjectRepo } from "@vived/core";
import { makeRemoveCorrectObjectIdUcMock } from "../Mocks/RemoveCorrectObjectIdUcMock";
import { removeCorrectObjectPickID } from "./removeCorrectObjectPickID";
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const mockUC = makeRemoveCorrectObjectIdUcMock(appObjects);
    return { appObjects, mockUC };
}
describe("Removed correct object pick ID", () => {
    it("Calls the UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        removeCorrectObjectPickID("obj1", appObjects);
        expect(mockUC.removeCorrectObjectId).toHaveBeenCalledWith("obj1");
    });
    it("Warns if there is no UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        mockUC.dispose();
        appObjects.submitWarning = jest.fn();
        removeCorrectObjectPickID("obj1", appObjects);
        expect(appObjects.submitWarning).toHaveBeenCalled();
    });
});
//# sourceMappingURL=removeCorrectObjectPickID.test.js.map