Skip to content

Commit 1919f97

Browse files
committed
adding support for DSONameService
1 parent f471957 commit 1919f97

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/app/entity-groups/research-entities/metadata-representations/project/project-item-metadata-list-element.component.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Item } from '../../../../core/shared/item.model';
99
import { ProjectItemMetadataListElementComponent } from './project-item-metadata-list-element.component';
1010
import { MetadataValue } from '../../../../core/shared/metadata.models';
1111
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
12+
import { DSONameServiceMock } from '../../../../shared/mocks/dso-name.service.mock';
1213

1314
const projectTitle = 'Lorem ipsum dolor sit amet';
1415
const mockItem = Object.assign(new Item(), { metadata: { 'dc.title': [{ value: projectTitle }] } });
@@ -27,7 +28,7 @@ describe('ProjectItemMetadataListElementComponent', () => {
2728
],
2829
declarations: [ProjectItemMetadataListElementComponent],
2930
providers: [
30-
{ provide: DSONameService, useValue: dsoNameService }
31+
{ provide: DSONameService, useValue: new DSONameServiceMock() }
3132
],
3233
schemas: [NO_ERRORS_SCHEMA]
3334
}).overrideComponent(ProjectItemMetadataListElementComponent, {
@@ -40,9 +41,6 @@ describe('ProjectItemMetadataListElementComponent', () => {
4041
comp = fixture.componentInstance;
4142
comp.mdRepresentation = mockItemMetadataRepresentation;
4243
fixture.detectChanges();
43-
dsoNameService = jasmine.createSpyObj({
44-
getName: projectTitle
45-
});
4644
});
4745

4846
it('should show the project\'s name as a link', () => {

0 commit comments

Comments
 (0)