import { historyDtoToStatusText } from './history-dto-to-status-text.mapping';
import { historyDtoMock } from '../../../shared/mockdata';

fdescribe('Mapping: historyDtoToStatusText', () => {
  it('should return the description as status text', () => {
    const details = historyDtoMock;

    const result = historyDtoToStatusText(details);
    const expected = 'Test Description';

    expect(result).toEqual(expected);
  });

  it('should return a default status if no description is set', () => {
    const { description, ...details } = historyDtoMock;

    const result = historyDtoToStatusText(details);
    const expected = 'Status der Bestellung wurde geändert';

    expect(result).toEqual(expected);
  });
});
