fix: SPARQL PATCH Content Type

This commit is contained in:
Matthieu Bosquet
2021-02-26 13:34:27 +00:00
committed by Joachim Van Herwegen
parent 5c6822d468
commit 2a34a430fa
3 changed files with 19 additions and 5 deletions

View File

@@ -21,9 +21,9 @@ describe('A SparqlUpdateBodyParser', (): void => {
it('only accepts application/sparql-update content.', async(): Promise<void> => {
await expect(bodyParser.canHandle(input)).rejects.toThrow(UnsupportedMediaTypeHttpError);
input.request.headers = { 'content-type': 'text/plain' };
input.metadata.contentType = 'text/plain';
await expect(bodyParser.canHandle(input)).rejects.toThrow(UnsupportedMediaTypeHttpError);
input.request.headers = { 'content-type': 'application/sparql-update' };
input.metadata.contentType = 'application/sparql-update';
await expect(bodyParser.canHandle(input)).resolves.toBeUndefined();
});