blob: ab8f504ca0ad283b4b75d7ff69861be7cee60a53 [file] [log] [blame]
import { CommunicationType } from '@shared/models';
import { CommunicationTypesService } from '@pages/admin/communication-types/communication-types.service';
describe('CommunicationTypesService', () => {
let service: CommunicationTypesService;
beforeEach(() => {
});
it('should transform list', () => {
const response = [new CommunicationType()];
response[0].type = 'X';
expect(CommunicationTypesService.gridAdapter(response)[0].type).toBe('X');
});
it('should transform details', () => {
const response: any = { type: 'X'};
const item = CommunicationTypesService.responseAdapter(response);
expect(item.type).toBe(response.type);
});
});