@@ -299,7 +299,7 @@ describe('ResourceInstanceFormComponent', () => {
299299 usersEndpoint : jasmine . createSpyObj ( 'usersEndpoint' , [ 'getUserByUsername' ] )
300300 } ,
301301 v2 : {
302- onto : jasmine . createSpyObj ( 'onto' , [ 'getOntologiesByProjectIri' ] ) ,
302+ onto : jasmine . createSpyObj ( 'onto' , [ 'getOntologiesByProjectIri' , 'getOntology' , 'getResourceClassDefinition' ] ) ,
303303 ontologyCache : jasmine . createSpyObj ( 'ontologyCache' , [ 'getOntology' , 'getResourceClassDefinition' ] ) ,
304304 res : jasmine . createSpyObj ( 'res' , [ 'createResource' ] )
305305 }
@@ -452,16 +452,11 @@ describe('ResourceInstanceFormComponent', () => {
452452 it ( 'should show the select resource class component' , ( ) => {
453453 const dspConnSpy = TestBed . inject ( DspApiConnectionToken ) ;
454454
455- ( dspConnSpy . v2 . ontologyCache as jasmine . SpyObj < OntologyCache > ) . getOntology . and . callFake (
455+ ( dspConnSpy . v2 . onto as jasmine . SpyObj < OntologiesEndpointV2 > ) . getOntology . and . callFake (
456456 ( ) => {
457457
458458 const anythingOnto = MockOntology . mockReadOntology ( 'http://0.0.0.0:3333/ontology/0001/anything/v2' ) ;
459-
460- const ontoMap : Map < string , ReadOntology > = new Map ( ) ;
461-
462- ontoMap . set ( 'http://0.0.0.0:3333/ontology/0001/anything/v2' , anythingOnto ) ;
463-
464- return of ( ontoMap ) ;
459+ return of ( anythingOnto ) ;
465460 }
466461 ) ;
467462
@@ -484,16 +479,11 @@ describe('ResourceInstanceFormComponent', () => {
484479
485480 const dspConnSpy = TestBed . inject ( DspApiConnectionToken ) ;
486481
487- ( dspConnSpy . v2 . ontologyCache as jasmine . SpyObj < OntologyCache > ) . getOntology . and . callFake (
482+ ( dspConnSpy . v2 . onto as jasmine . SpyObj < OntologiesEndpointV2 > ) . getOntology . and . callFake (
488483 ( ) => {
489484
490485 const anythingOnto = MockOntology . mockReadOntology ( 'http://0.0.0.0:3333/ontology/0001/anything/v2' ) ;
491-
492- const ontoMap : Map < string , ReadOntology > = new Map ( ) ;
493-
494- ontoMap . set ( 'http://0.0.0.0:3333/ontology/0001/anything/v2' , anythingOnto ) ;
495-
496- return of ( ontoMap ) ;
486+ return of ( anythingOnto ) ;
497487 }
498488 ) ;
499489
0 commit comments