Skip to content

Commit f471957

Browse files
committed
adding support for DSONameService
1 parent 72eaf35 commit f471957

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ 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';
1312

1413
const projectTitle = 'Lorem ipsum dolor sit amet';
1514
const mockItem = Object.assign(new Item(), { metadata: { 'dc.title': [{ value: projectTitle }] } });
@@ -28,7 +27,7 @@ describe('ProjectItemMetadataListElementComponent', () => {
2827
],
2928
declarations: [ProjectItemMetadataListElementComponent],
3029
providers: [
31-
{ provide: DSONameService, useValue: new DSONameServiceMock() }
30+
{ provide: DSONameService, useValue: dsoNameService }
3231
],
3332
schemas: [NO_ERRORS_SCHEMA]
3433
}).overrideComponent(ProjectItemMetadataListElementComponent, {
@@ -41,6 +40,9 @@ describe('ProjectItemMetadataListElementComponent', () => {
4140
comp = fixture.componentInstance;
4241
comp.mdRepresentation = mockItemMetadataRepresentation;
4342
fixture.detectChanges();
43+
dsoNameService = jasmine.createSpyObj({
44+
getName: projectTitle
45+
});
4446
});
4547

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

0 commit comments

Comments
 (0)