fixed type issues in tests

This commit is contained in:
Art Lowel
2018-01-17 16:29:12 +01:00
parent 334b07ac26
commit f349f27002
4 changed files with 6 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
import { ConfigSuccessResponse, ErrorResponse } from '../cache/response-cache.models';
import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response.model';
import { ConfigResponseParsingService } from './config-response-parsing.service';
import { ObjectCacheService } from '../cache/object-cache.service';
import { GlobalConfig } from '../../../config/global-config.interface';

View File

@@ -1,6 +1,6 @@
export interface DSpaceRESTV2Response {
payload: {
[name: string]: string;
[name: string]: any;
_embedded?: any;
_links?: any;
page?: any;

View File

@@ -12,6 +12,7 @@ import { Store, StoreModule } from '@ngrx/store';
import { Observable } from 'rxjs/Observable';
import { RemoteDataError } from '../data/remote-data-error';
import { UUIDService } from '../shared/uuid.service';
import { MetadataService } from './metadata.service';
@@ -65,6 +66,7 @@ describe('MetadataService', () => {
let objectCacheService: ObjectCacheService;
let responseCacheService: ResponseCacheService;
let requestService: RequestService;
let uuidService: UUIDService;
let remoteDataBuildService: RemoteDataBuildService;
let itemDataService: ItemDataService;
@@ -83,7 +85,8 @@ describe('MetadataService', () => {
objectCacheService = new ObjectCacheService(store);
responseCacheService = new ResponseCacheService(store);
requestService = new RequestService(objectCacheService, responseCacheService, store);
uuidService = new UUIDService();
requestService = new RequestService(objectCacheService, responseCacheService, uuidService, store);
remoteDataBuildService = new RemoteDataBuildService(objectCacheService, responseCacheService, requestService);
TestBed.configureTestingModule({

View File

@@ -104,13 +104,10 @@ describe('Item', () => {
function createRemoteDataObject(object: any) {
return Observable.of(new RemoteData(
'',
false,
false,
true,
undefined,
'200',
new PageInfo(),
object
));