From 5ebcfb28b6229b4df1757b9c1864dced58dcfcba Mon Sep 17 00:00:00 2001 From: entholzer Date: Sat, 9 Nov 2024 18:12:46 +0100 Subject: [PATCH] improved coverage --- .../attachment-unit.component.spec.ts | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/test/javascript/spec/component/lecture-unit/attachment-unit/attachment-unit.component.spec.ts b/src/test/javascript/spec/component/lecture-unit/attachment-unit/attachment-unit.component.spec.ts index fac921fd99ac..3e76c89715df 100644 --- a/src/test/javascript/spec/component/lecture-unit/attachment-unit/attachment-unit.component.spec.ts +++ b/src/test/javascript/spec/component/lecture-unit/attachment-unit/attachment-unit.component.spec.ts @@ -9,7 +9,20 @@ import { MockProvider } from 'ng-mocks'; import { provideHttpClient } from '@angular/common/http'; import { MockTranslateService } from '../../../helpers/mocks/service/mock-translate.service'; import { ScienceService } from 'app/shared/science/science.service'; -import { IconDefinition, faFile, faFileCsv, faFileImage, faFilePdf } from '@fortawesome/free-solid-svg-icons'; +import { + IconDefinition, + faFile, + faFileArchive, + faFileCode, + faFileCsv, + faFileExcel, + faFileImage, + faFileLines, + faFilePdf, + faFilePen, + faFilePowerpoint, + faFileWord, +} from '@fortawesome/free-solid-svg-icons'; describe('AttachmentUnitComponent', () => { let scienceService: ScienceService; @@ -82,6 +95,13 @@ describe('AttachmentUnitComponent', () => { ['pdf', faFilePdf], ['csv', faFileCsv], ['png', faFileImage], + ['zip', faFileArchive], + ['txt', faFileLines], + ['doc', faFileWord], + ['json', faFileCode], + ['xls', faFileExcel], + ['ppt', faFilePowerpoint], + ['odf', faFilePen], ['exotic', faFile], ])('should use correct icon for extension', async (extension: string, icon: IconDefinition) => { const getAttachmentIconSpy = jest.spyOn(component, 'getAttachmentIcon');