mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-4647] download service (#4836)
* split download api into separate service * move tests and fix code * break dependency for thumbnail service * update tests * test fixes * fix code * fix unit tests
This commit is contained in:
committed by
Eugenio Romano
parent
d0d1154f84
commit
a37f935c05
@@ -16,13 +16,14 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiServiceMock, AppConfigService, ContentService,
|
||||
setupTestBed, CoreModule, TranslationMock, StorageService
|
||||
setupTestBed, CoreModule, TranslationMock, AlfrescoApiService, StorageService
|
||||
} from '@alfresco/adf-core';
|
||||
import { FileNode, FolderNode } from '../../mock';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { DocumentActionsService } from './document-actions.service';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
import { of } from 'rxjs';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
describe('DocumentActionsService', () => {
|
||||
|
||||
@@ -30,14 +31,18 @@ describe('DocumentActionsService', () => {
|
||||
let documentListService: DocumentListService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
imports: [CoreModule.forRoot()],
|
||||
providers: [
|
||||
{
|
||||
provide: AlfrescoApiService,
|
||||
useValue: new AlfrescoApiServiceMock(new AppConfigService(null), new StorageService())
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
const contentService = new ContentService(null, null, null, null);
|
||||
const alfrescoApiService = new AlfrescoApiServiceMock(new AppConfigService(null), new StorageService());
|
||||
const contentService = TestBed.get(ContentService);
|
||||
|
||||
documentListService = new DocumentListService(contentService, alfrescoApiService, null, null);
|
||||
service = new DocumentActionsService(null, null, new TranslationMock(), documentListService, contentService);
|
||||
|
Reference in New Issue
Block a user