import { makeAppObjectRepo } from "@vived/core";
import { makeMockStateMachine } from "../Mocks";
import { clickRestoreScene } from "./clickRestoreScene";
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const stateMachine = makeMockStateMachine(appObjects);
    return { appObjects, stateMachine };
}
describe("Click Restore Scene", () => {
    it("Calls restore on the entity", () => {
        const { appObjects, stateMachine } = makeTestRig();
        stateMachine.restoreLastState = jest.fn();
        clickRestoreScene(appObjects);
        expect(stateMachine.restoreLastState).toHaveBeenCalled();
    });
    it("Logs an error if the state machine cannot be found", () => {
        const appObjects = makeAppObjectRepo();
        appObjects.submitWarning = jest.fn();
        appObjects.submitError = jest.fn();
        clickRestoreScene(appObjects);
        expect(appObjects.submitError).toHaveBeenCalled();
    });
});
//# sourceMappingURL=clickRestoreScene.test.js.map