const BioDetails = require('./bio-details');

describe('BioDetails Model', () => {
  it('validate schema', () => {
    const bioLibraryItem = {
      type: 'BIOLOGICAL',
      name: 'Drosophila bocki',
      tags: ['Invertebrates'],
      details: {
        materialType: 'Invertebrates',
        riskGroup: '1',
        category: 'Animals',
        knownPathogens: '',
      },
    };

    const bioDetails = new BioDetails(bioLibraryItem.details);
    const validate = bioDetails.validate();

    expect(validate.valid).toBeTruthy();
  });
});
