Skip to content

Commit

Permalink
remove more
Browse files Browse the repository at this point in the history
  • Loading branch information
BalduinLandolt committed Mar 20, 2024
1 parent 0c09d80 commit 2b22fc8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
4 changes: 0 additions & 4 deletions scripts/v2-test-data-config.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
26 changes: 0 additions & 26 deletions src/api/v2/ontology/ontologies-endpoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
5 changes: 0 additions & 5 deletions test/data/api/v2/mock-ontology.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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;
Expand Down

0 comments on commit 2b22fc8

Please sign in to comment.