From 23473f59e69c1e028c7796996d98cf571277ad14 Mon Sep 17 00:00:00 2001 From: Matthieu Bosquet Date: Fri, 26 Feb 2021 14:01:29 +0000 Subject: [PATCH] fix: SPARQL body parser test content type metadata --- test/unit/ldp/http/SparqlUpdateBodyParser.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unit/ldp/http/SparqlUpdateBodyParser.test.ts b/test/unit/ldp/http/SparqlUpdateBodyParser.test.ts index f31c117bb..3d53c73e6 100644 --- a/test/unit/ldp/http/SparqlUpdateBodyParser.test.ts +++ b/test/unit/ldp/http/SparqlUpdateBodyParser.test.ts @@ -23,6 +23,10 @@ describe('A SparqlUpdateBodyParser', (): void => { await expect(bodyParser.canHandle(input)).rejects.toThrow(UnsupportedMediaTypeHttpError); input.metadata.contentType = 'text/plain'; await expect(bodyParser.canHandle(input)).rejects.toThrow(UnsupportedMediaTypeHttpError); + input.metadata.contentType = 'application/sparql-update;charset=utf-8'; + await expect(bodyParser.canHandle(input)).rejects.toThrow(UnsupportedMediaTypeHttpError); + input.metadata.contentType = 'application/sparql-update ; foo=bar'; + await expect(bodyParser.canHandle(input)).rejects.toThrow(UnsupportedMediaTypeHttpError); input.metadata.contentType = 'application/sparql-update'; await expect(bodyParser.canHandle(input)).resolves.toBeUndefined(); });