mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
@@ -17,23 +17,23 @@
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { ThumbnailService } from './thumbnail.service';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ThumbnailService', () => {
|
||||
|
||||
let service: ThumbnailService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
service = TestBed.inject(ThumbnailService);
|
||||
});
|
||||
|
||||
it('should return the correct icon for a PDF document', () => {
|
||||
expect(service.getMimeTypeIcon('application/pdf')).toContain('ft_ic_pdf');
|
||||
});
|
||||
|
||||
it('should return the correct icon for a DOCX document', () => {
|
||||
expect(service.getMimeTypeIcon('application/msword')).toContain('ft_ic_ms_word');
|
||||
});
|
||||
|
||||
it('should return the correct icon for a plain text file', () => {
|
||||
expect(service.getMimeTypeIcon('text/plain')).toContain('ft_ic_document');
|
||||
});
|
||||
|
Reference in New Issue
Block a user