Skip to content

Commit

Permalink
refactor(ontology): correct mock of DSP-API connection
Browse files Browse the repository at this point in the history
  • Loading branch information
kilchenmann committed Mar 18, 2021
1 parent ffbc7e8 commit baf0a41
Showing 1 changed file with 7 additions and 6 deletions.
Expand Up @@ -134,6 +134,12 @@ describe('PropertyFormComponent', () => {
const cacheServiceSpyOnto = jasmine.createSpyObj('CacheServiceOnto', ['get']);
const cacheServiceSpyLists = jasmine.createSpyObj('CacheServiceLists', ['get']);

const ontologyEndpointSpyObj = {
v2: {
ontologyEndpoint: jasmine.createSpyObj('onto', ['updateResourceProperty', 'createResourceProperty'])
}
};

TestBed.configureTestingModule({
declarations: [
LinkHostComponent,
Expand All @@ -156,14 +162,9 @@ describe('PropertyFormComponent', () => {
TranslateModule.forRoot()
],
providers: [
AppInitService,
{
provide: DspApiConfigToken,
useValue: TestConfig.ApiConfig
},
{
provide: DspApiConnectionToken,
useValue: new KnoraApiConnection(TestConfig.ApiConfig)
useValue: ontologyEndpointSpyObj
},
{
provide: CacheService,
Expand Down

0 comments on commit baf0a41

Please sign in to comment.