const Helper = require('./inspect.helper');
const { NOT_RESOLVED } = require('../constant/inspect/inspect-finding-status.constant');

describe('Inspect Helper', () => {
  it('should return true if there is any unresolved incident', () => {
    const document = {
      findings: [
        {
          description:
            'Medical Compressed Gas cylinders are stored upright, secured, and not in a location obstructing medical gas valve equipment, electrical panels, or fire-life safety equipment.',
          incidents: [
            {
              value: 'NOT_COMPLIANT',
              status: NOT_RESOLVED,
            },
          ],
        },
      ],
    };
    expect(Helper.hasUnresolvedIncident(document)).toBeTruthy();
  });
});
