fix: Let Representations always have a body

This is relevant when the request has a content-type
but no data.
This commit is contained in:
Joachim Van Herwegen
2021-10-11 15:21:40 +02:00
parent f1ef2ced03
commit 5613ff9e71
36 changed files with 95 additions and 63 deletions

View File

@@ -19,10 +19,6 @@ describe('A SparqlPatchModesExtractor', (): void => {
await expect(result).rejects.toThrow(NotImplementedHttpError);
await expect(result).rejects.toThrow('Cannot determine permissions of GET, only PATCH.');
result = extractor.canHandle({ ...operation, body: undefined });
await expect(result).rejects.toThrow(NotImplementedHttpError);
await expect(result).rejects.toThrow('Cannot determine permissions of PATCH operations without a body.');
result = extractor.canHandle({ ...operation, body: {} as SparqlUpdatePatch });
await expect(result).rejects.toThrow(NotImplementedHttpError);
await expect(result).rejects.toThrow('Cannot determine permissions of non-SPARQL patches.');