solved tests

This commit is contained in:
lotte
2019-08-28 16:58:21 +02:00
parent dc3302e73b
commit 85279c5601
23 changed files with 41 additions and 95 deletions

View File

@@ -132,13 +132,7 @@ import { SearchConfigurationService } from './shared/search/search-configuration
import { SelectableListService } from '../shared/object-list/selectable-list/selectable-list.service';
import { RelationshipTypeService } from './data/relationship-type.service';
export const restServiceFactory = (cfg: GlobalConfig, mocks: MockResponseMap, http: HttpClient) => {
if (ENV_CONFIG.production) {
return new DSpaceRESTv2Service(http);
} else {
return new EndpointMockingRestService(cfg, mocks, http);
}
};
const IMPORTS = [
CommonModule,
@@ -158,8 +152,7 @@ const PROVIDERS = [
CommunityDataService,
CollectionDataService,
DSOResponseParsingService,
{ provide: MOCK_RESPONSE_MAP, useValue: mockResponseMap },
{ provide: DSpaceRESTv2Service, useFactory: restServiceFactory, deps: [GLOBAL_CONFIG, MOCK_RESPONSE_MAP, HttpClient]},
DSpaceRESTv2Service,
DynamicFormLayoutService,
DynamicFormService,
DynamicFormValidationService,