fix: Make Patch more consistent with other Representations

This commit is contained in:
Joachim Van Herwegen
2020-08-04 10:05:48 +02:00
parent 14db5fed91
commit d6a35f9954
6 changed files with 24 additions and 18 deletions

View File

@@ -80,9 +80,9 @@ describe('A SimpleSparqlUpdatePatchHandler', (): void => {
it('only accepts SPARQL updates.', async(): Promise<void> => {
const input = { identifier: { path: 'path' },
patch: { dataType: 'sparql-algebra', algebra: {}} as SparqlUpdatePatch };
patch: { algebra: {}} as SparqlUpdatePatch };
await expect(handler.canHandle(input)).resolves.toBeUndefined();
input.patch.dataType = 'notAlgebra';
delete input.patch.algebra;
await expect(handler.canHandle(input)).rejects.toThrow(UnsupportedHttpError);
});