Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('DocumentActionsService', () => {
let service: DocumentActionsService;
let documentListService: DocumentListService;
setupTestBed({
imports: [CoreModule.forRoot()],
providers: [
{
provide: AlfrescoApiService,
useValue: new AlfrescoApiServiceMock(new AppConfigService(null), new StorageService())
}
]
});
beforeEach(() => {
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);
});
it('should register default download action', () => {
expect(service.getHandler('download')).not.toBeNull();
});
beforeEach(() => {
TestBed.configureTestingModule({
imports: [AppTestingModule, DirectivesModule, CoreModule.forRoot()],
schemas: [NO_ERRORS_SCHEMA]
});
alfrescoApiService = new AlfrescoApiServiceMock(
new AppConfigService(null),
new StorageService()
);
peopleApi = alfrescoApiService.getInstance().core.peopleApi;
directive = new LibraryMembershipDirective(alfrescoApiService);
});