"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@vived/core");
const TryChallengeAgainUcMock_1 = require("../Mocks/TryChallengeAgainUcMock");
const clickTryChallengeAgain_1 = require("./clickTryChallengeAgain");
function makeTestRig() {
    const appObjects = (0, core_1.makeAppObjectRepo)();
    const mockUC = (0, TryChallengeAgainUcMock_1.makeTryChallengeAgainUcMock)(appObjects);
    return { appObjects, mockUC };
}
describe("Click Try Challenge Again", () => {
    it("Calls the UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        (0, clickTryChallengeAgain_1.clickTryChallengeAgain)(appObjects);
        expect(mockUC.tryChallengeAgain).toHaveBeenCalledWith();
    });
    it("Warns if there is no UC", () => {
        const { appObjects, mockUC } = makeTestRig();
        mockUC.dispose();
        appObjects.submitWarning = jest.fn();
        (0, clickTryChallengeAgain_1.clickTryChallengeAgain)(appObjects);
        expect(appObjects.submitWarning).toHaveBeenCalled();
    });
});
//# sourceMappingURL=clickTryChallengeAgain.test.js.map