import { VATDTO } from '@swagger/oms';
import { VatDtoToVatValuePipe } from './vat-dto-to-vat-value.pipe';
import { vatDtosMock } from '../shared/mockdata';

fdescribe('Pipe: VatDtoToVatValuePipe', () => {
  let pipe: VatDtoToVatValuePipe;

  beforeEach(() => {
    pipe = new VatDtoToVatValuePipe();
  });

  it('should return 5%', () => {
    const mock: VATDTO = vatDtosMock.find((vat) => vat.name === '5');
    const result = pipe.transform(mock);

    const expected = '5%';
    expect(result).toEqual(expected);
  });
});
