import { PatchPerformanceReviewFormTemplateVC } from '../../../../src/api/modules/performanceReviews/presentation/validationClasses/patchPerformanceReviewFormTemplateVC';
import { getValidationClass } from '../../../common/serializationClasses/serializationClassesHelper';

describe('PatchPerformanceReviewFormTemplateVC', () => {
    it('should pass validation when withCalibration is true', () => {
        const { errors, output } = getValidationClass(
            { withCalibration: true },
            PatchPerformanceReviewFormTemplateVC,
        );

        expect(errors).toHaveLength(0);
        expect(output!.withCalibration).toBe(true);
    });

    it('should pass validation when withCalibration is false', () => {
        const { errors, output } = getValidationClass(
            { withCalibration: false },
            PatchPerformanceReviewFormTemplateVC,
        );

        expect(errors).toHaveLength(0);
        expect(output!.withCalibration).toBe(false);
    });

    it('should pass validation when body is empty (no fields to update)', () => {
        const { errors, output } = getValidationClass({}, PatchPerformanceReviewFormTemplateVC);

        expect(errors).toHaveLength(0);
        expect(output!.withCalibration).toBeUndefined();
    });
});
