"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@vived/core");
const Mocks_1 = require("../Mocks");
const clickRestoreScene_1 = require("./clickRestoreScene");
function makeTestRig() {
    const appObjects = (0, core_1.makeAppObjectRepo)();
    const stateMachine = (0, Mocks_1.makeMockStateMachine)(appObjects);
    return { appObjects, stateMachine };
}
describe("Click Restore Scene", () => {
    it("Calls restore on the entity", () => {
        const { appObjects, stateMachine } = makeTestRig();
        stateMachine.restoreLastState = jest.fn();
        (0, clickRestoreScene_1.clickRestoreScene)(appObjects);
        expect(stateMachine.restoreLastState).toHaveBeenCalled();
    });
    it("Logs an error if the state machine cannot be found", () => {
        const appObjects = (0, core_1.makeAppObjectRepo)();
        appObjects.submitWarning = jest.fn();
        appObjects.submitError = jest.fn();
        (0, clickRestoreScene_1.clickRestoreScene)(appObjects);
        expect(appObjects.submitError).toHaveBeenCalled();
    });
});
//# sourceMappingURL=clickRestoreScene.test.js.map