From 2b22fc8c2dbfb425ea07c8667e7311bf2658d149 Mon Sep 17 00:00:00 2001 From: Balduin Landolt <33053745+BalduinLandolt@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:49:52 +0100 Subject: [PATCH] remove more --- scripts/v2-test-data-config.json | 4 --- .../v2/ontology/ontologies-endpoint.spec.ts | 26 ------------------- test/data/api/v2/mock-ontology.ts | 5 ---- 3 files changed, 35 deletions(-) diff --git a/scripts/v2-test-data-config.json b/scripts/v2-test-data-config.json index b5c60619c..9ee2e89c1 100644 --- a/scripts/v2-test-data-config.json +++ b/scripts/v2-test-data-config.json @@ -1,9 +1,5 @@ { "generated-test-data": [ - { - "source": "/v2/ontologies/all-ontology-metadata-response.json", - "destination": "./test/data/api/v2/ontologies/all-ontology-metadata-response.json" - }, { "source": "/v2/ontologies/knora-api-ontology.json", "destination": "./test/data/api/v2/ontologies/knora-api-ontology.json" diff --git a/src/api/v2/ontology/ontologies-endpoint.spec.ts b/src/api/v2/ontology/ontologies-endpoint.spec.ts index e6bde4c96..a39e87389 100644 --- a/src/api/v2/ontology/ontologies-endpoint.spec.ts +++ b/src/api/v2/ontology/ontologies-endpoint.spec.ts @@ -46,32 +46,6 @@ describe("OntologiesEndpoint", () => { jasmine.Ajax.uninstall(); }); - describe("Method getOntologiesMetadata", () => { - - it("should return metadata about all ontologies", done => { - - knoraApiConnection.v2.onto.getOntologiesMetadata().subscribe( - (response: OntologiesMetadata) => { - expect(response.ontologies.length).toEqual(15); - expect(response.ontologies[0].id).toEqual("http://0.0.0.0:3333/ontology/0001/anything/v2"); - done(); - } - ); - - const request = jasmine.Ajax.requests.mostRecent(); - - const ontoMetadata = require("../../../../test/data/api/v2/ontologies/all-ontology-metadata-response.json"); - - request.respondWith(MockAjaxCall.mockResponse(JSON.stringify(ontoMetadata))); - - expect(request.url).toBe("http://0.0.0.0:3333/v2/ontologies/metadata"); - - expect(request.method).toEqual("GET"); - - }); - - }); - describe("Method getOntology", () => { it("should return an ontology", done => { diff --git a/test/data/api/v2/mock-ontology.ts b/test/data/api/v2/mock-ontology.ts index 2250ceeca..1177a4381 100644 --- a/test/data/api/v2/mock-ontology.ts +++ b/test/data/api/v2/mock-ontology.ts @@ -12,7 +12,6 @@ import { ResourceClassDefinition } from "../../../../src/models/v2/ontologies/re import { ResourcePropertyDefinition } from "../../../../src/models/v2/ontologies/resource-property-definition"; import { StandoffClassDefinition } from "../../../../src/models/v2/ontologies/standoff-class-definition"; import { SystemPropertyDefinition } from "../../../../src/models/v2/ontologies/system-property-definition"; -import ontologiesMetadata from "../v2/ontologies/all-ontology-metadata-response-expanded.json"; import anythingOntologyExpanded from "../v2/ontologies/anything-ontology-expanded.json"; import knoraApiOntologyExpanded from "../v2/ontologies/knora-api-ontology-expanded.json"; @@ -25,10 +24,6 @@ export namespace MockOntology { PropertyMatchingRule.CASE_STRICT ); - export const mockOntologiesMetadata = (): OntologiesMetadata => { - return jsonConvert.deserializeObject(ontologiesMetadata, OntologiesMetadata); - }; - export const mockReadOntology = (ontoIri: string): ReadOntology => { let ontologyJsonld: any;