Correctly handle slugs in POST requests

* bug: correctly handle slug in POST request

* bug: disallow slashes in slug + modified tests

* fix: fixed tests to work with PUT instead of POST+slug

* fix: fixed tests failing in ci

* fix: adapted to reviews

* fix: adapted to review
This commit is contained in:
Arthur Joppart
2021-02-24 12:03:41 +01:00
committed by GitHub
parent 894d4589d9
commit 28c0eb7e88
6 changed files with 154 additions and 103 deletions

View File

@@ -35,9 +35,8 @@ describeIf('docker', 'A server with a SPARQL endpoint as storage', (): void => {
it('can add a Turtle file to the store.', async():
Promise<void> => {
// POST
// PUT
const response = await resourceHelper.createResource('../assets/person.ttl', 'person', 'text/turtle');
const id = response._getHeaders().location;
expect(id).toBeTruthy();
expect(response).toBeTruthy();
});
});