70597: Test fixes

This commit is contained in:
Kristof De Langhe
2020-05-11 13:21:01 +02:00
parent f5f4570116
commit 67b73ff921
4 changed files with 8 additions and 8 deletions

View File

@@ -23,13 +23,17 @@ describe('CollectionMetadataComponent', () => {
let itemTemplateService: ItemTemplateDataService;
const template = Object.assign(new Item(), {
self: 'template-selflink'
_links: {
self: { href: 'template-selflink' }
}
});
const collection = Object.assign(new Collection(), {
uuid: 'collection-id',
id: 'collection-id',
name: 'Fake Collection',
self: 'collection-selflink'
_links: {
self: { href: 'collection-selflink' }
}
});
const itemTemplateServiceStub = Object.assign({

View File

@@ -29,7 +29,7 @@ describe('EditItemTemplatePageComponent', () => {
declarations: [EditItemTemplatePageComponent],
providers: [
{ provide: ItemTemplateDataService, useValue: {} },
{ provide: ActivatedRoute, useValue: { data: observableOf({ dso: createSuccessfulRemoteDataObject(collection) }) } }
{ provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: createSuccessfulRemoteDataObject(collection) }) } } }
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();

View File

@@ -143,6 +143,7 @@ describe('ItemBitstreamsComponent', () => {
parent: {
data: observableOf({ item: createMockRD(item) })
},
data: observableOf({}),
url: url
});
bundleService = jasmine.createSpyObj('bundleService', {

View File

@@ -59,11 +59,6 @@ describe('ServerSyncBufferEffects', () => {
}
});
return observableOf(object);
},
getBySelfLink: (link) => {
const object = new DSpaceObject();
object.self = link;
return observableOf(object);
}
}
},