Add tests for search services and components

Refs #190
This commit is contained in:
Will Abson
2016-06-23 08:16:07 +01:00
parent 91ca490824
commit 4a255d29c0
12 changed files with 423 additions and 28 deletions

View File

@@ -28,4 +28,21 @@ describe('AlfrescoThumbnailService', () => {
beforeEach(() => {
service = new AlfrescoThumbnailService(null);
});
it('should return the correct icon for a plain text file', () => {
expect(service.getMimeTypeIcon('text/plain')).toBe('ft_ic_document.svg');
});
it('should return the correct icon for a PNG file', () => {
expect(service.getMimeTypeIcon('image/png')).toBe('ft_ic_raster_image.svg');
});
it('should return the correct icon for a MP4 video file', () => {
expect(service.getMimeTypeIcon('video/mp4')).toBe('ft_ic_video.svg');
});
it('should return a generic icon for an unknown file', () => {
expect(service.getMimeTypeIcon('x-unknown/yyy')).toBe('ft_ic_miscellaneous.svg');
});
});