mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: SPARQL PATCH Content Type
This commit is contained in:
committed by
Joachim Van Herwegen
parent
5c6822d468
commit
2a34a430fa
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user